SubstringBefore Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
SubstringBefore(string, string, StringComparison)
Retrieves a substring from the specified value. The substring starts at position 0 and continues until the first occurrence of match.
public static string SubstringBefore(this string value, string match, StringComparison comparisonType = StringComparison.OrdinalIgnoreCase)
Parameters
valuestringThe string to extend.
matchstringThe match that will define the stopping point.
comparisonTypeStringComparisonOne of the enumeration values that specifies the rules for the search.
Returns
- string
A substring that contains only the value just before
match.