Contains()

Namespace ›› System ›› MfCharList ›› Methods ››
Parent Previous Next

Contains()

Determines whether the MfCharList contains a specific element.
Overrides MfListBase.Contains()

OutputVar := instance.Contains(obj [, ignoreCase])

Contains(obj [, ignoreCase])

Determines whether the MfCharList contains a specific var.

Parameters

obj

The char code integer or instance of MfCharList or string to find matching index of within current instance of MfCharList.
Can be var integer or var string or instance of MfCharList or instance of MfString or any type that matches IsIntegerNumber.

IgnoreCase

Optional, if true then case will be ignored when searching; Otherwise case will be considered.
Default value is true.

Returns

Returns true if the MfCharList contains the specified obj otherwise, false.

Remarks

This method performs a linear search; therefore, this method is an O(n) operation, where n is Count.

If obj is a string var then contains will follow ignoreCase.