Class StringHelper
Isolating these helpers allow this entire project to be easily converted to Java
Inheritance
System.Object
StringHelper
Namespace: MediaBrowser.Model.Extensions
Assembly: MediaBrowser.Model.dll
Syntax
public static class StringHelper
Methods
ContainsIgnoreCase(String, String)
Returns a value indicating whether a specified substring occurs within a string. Strings are compared using System.StringComparison.OrdinalIgnoreCase.
Declaration
public static bool ContainsIgnoreCase(this string str1, string str2)
Parameters
Type | Name | Description |
---|---|---|
System.String | str1 | The string to be sought. |
System.String | str2 | The string to seek. |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Remarks
Returns false in case str1
is null. Does not throw.
EqualsIgnoreCase(String, String)
Determines whether two specified System.String objects have the same value. Strings are compared using System.StringComparison.OrdinalIgnoreCase.
Declaration
public static bool EqualsIgnoreCase(this string str1, string str2)
Parameters
Type | Name | Description |
---|---|---|
System.String | str1 | The first string to compare, or null. |
System.String | str2 | The second string to compare, or null. |
Returns
Type | Description |
---|---|
System.Boolean | true if the value of the |
Split(ReadOnlySpan<Char>, Char[])
Declaration
public static ReadOnlyMemory<char>[] Split(this ReadOnlySpan<char> value, char[] splitChars)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlySpan<System.Char> | value | |
System.Char[] | splitChars |
Returns
Type | Description |
---|---|
System.ReadOnlyMemory<System.Char>[] |