Class StringUtils
The utility class for strings
Inheritance
System.Object
StringUtils
Namespace: black.kit.toybox
Assembly: cs.temp.dll.dll
Syntax
public static class StringUtils
Methods
AreAllCharsContained(String, String)
Determine whether the string contains all the characters in the specified string.
Declaration
public static bool AreAllCharsContained(this string target, string chars)
Parameters
Type | Name | Description |
---|---|---|
System.String | target | String to be checked. |
System.String | chars | String containing characters to be checked. |
Returns
Type | Description |
---|---|
System.Boolean | True if the string contains all the characters in the specified string, |
Examples
"bcd".AreAllCharsContained("abcde"); // true
"bcd".AreAllCharsContained("bcd"); // true
"abc".AreAllCharsContained("bcd"); // false
"abc".AreAllCharsContained("def"); // false
"".AreAllCharsContained("abc"); // true
"abc".AreAllCharsContained(""); // false
"abc".AreAllCharsContained(null); // false
"".AreAllCharsContained(""); // true