Method StartsWithIgnoreCase
StartsWithIgnoreCase(String, String)
Determines whether the beginning of this string instance matches the specified string instance based on
a case-insensitive comparison, taking the current culture into account.
Declaration
public static bool StartsWithIgnoreCase(this string self, string value)
Parameters
Type |
Name |
Description |
String |
self |
This String instance whose end to compare to another. |
String |
value |
The String instance to compare to the substring at the beginning of this instance.
|
Returns
Type |
Description |
Boolean |
true , if the value parameter matches the beginning of this
String, otherwise false .
|
StartsWithIgnoreCase(String, String, Boolean)
Determines whether the beginning of this string instance matches the specified string instance based on
a case-insensitive comparison, optionally taking the current culture into account.
Declaration
public static bool StartsWithIgnoreCase(this string self, string value, bool useCurrentCulture)
Parameters
Type |
Name |
Description |
String |
self |
This String instance whose beginning to compare to another. |
String |
value |
The String instance to compare to the substring at the beginning of this instance.
|
Boolean |
useCurrentCulture |
If set to true , the current culture will be taken into account, otherwise the strings are
compared ordinally.
|
Returns
Type |
Description |
Boolean |
true , if the value parameter matches the beginning of this
String, otherwise false .
|