StartsWith()

String::StartsWith(const String&) const method

Checks if string begins with specified substring.

bool System::String::StartsWith(const String &value) const

Arguments

ParameterTypeDescription
valueconst String&Lookup string.

Return Value

true if string starts with specified substring, false otherwise.

String::StartsWith(const String&, System::StringComparison) const method

Checks if string begins with specified substring.

bool System::String::StartsWith(const String &value, System::StringComparison comparisonType) const

Arguments

ParameterTypeDescription
valueconst String&Lookup string.
comparisonTypeSystem::StringComparisonComparison mode, see System::StringComparison for details.

Return Value

true if string starts with specified substring, false otherwise.

String::StartsWith(const String&, bool, const SharedPtr<System::Globalization::CultureInfo>&) const method

Checks if string begins with specified substring.

bool System::String::StartsWith(const String &value, bool ignoreCase, const SharedPtr<System::Globalization::CultureInfo> &culture=nullptr) const

Arguments

ParameterTypeDescription
valueconst String&Lookup string.
ignoreCaseboolSpecifies whether comparison is case-insensitive.
cultureconst SharedPtr<System::Globalization::CultureInfo>&Culture to use while performing string comparison.

Return Value

true if string starts with specified substring, false otherwise.

See Also