StringExtensions.LeftBefore Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

LeftBefore(String, String, NullableComparison>)

Returns a string containing every character within a string before the first occurrence of another string.

public static string LeftBefore(this string original, string search, StringComparison? comparisonType = default(StringComparison? ))

Parameters

original
System.String
search
System.String
comparisonType
System.Nullable{System.StringComparison}

Returns

System.String

A string containing every character within the original string before the first occurrence of the search string.