Function

CFStringHasPrefix

Determines if the character data of a string begin with a specified sequence of characters.

Declaration

Boolean CFStringHasPrefix(CFStringRef theString, CFStringRef prefix);

Parameters

theString

The string to search.

prefix

The prefix to search for.

Return Value

true if theString begins with prefix, false if otherwise.

See Also

Comparing Strings

CFStringCompare

Compares one string with another string.

CFStringCompareWithOptions

Compares a range of the characters in one string with that of another string.

CFStringCompareWithOptionsAndLocale

Compares a range of the characters in one string with another string using a given locale.

CFStringHasSuffix

Determines if a string ends with a specified sequence of characters.