StringExtensions.LeftBeforeLast Method

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

LeftBeforeLast(String, String, NullableComparison>)

Returns a string containing every character within a string before (left) the last occurrence of another string.

public static string LeftBeforeLast(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 last occurrence of the search string.