Appearance
LeftOf Method
Definition
- Namespace:
JASE.Extensions - Assembly:
JASE.Primitives.dll
string LeftOf(string input, string value, bool trim = null)
csharp
string LeftOf(string input, string value, bool trim = null)Returns the substring of input that appears to the left of the first occurrence of value.
Parameters
| Name | Description |
|---|---|
input | The source string. If null or empty, it is returned unchanged. |
trim | When , trims whitespace from the returned substring. |
value | The marker string to search for. If null, empty, or not found within input, the full input is returned. |
Returns
The portion of input before value. If value is not found, the original string is returned.