StringUtil
Public / Constants
LoremIpsum
Some boilerplate text.
The text contains no line-breaks and a single whitespace at the end:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
LoremIpsumBlock
Some boilerplate text.
The text contains CRLF line-breaks (wrapping at 80 columns) and a single whitespace at the end:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Public / Methods
BinaryDecode
Decodes a string from the given compressed byte array.
- IOException
-
If the binary format of value in is invalid.
- See also
Compare
Compares the given strings.
-
null
string values appear first. -
Sort order is ascending, according to ordinal
UTF-16
character value. -
Of two strings having the same prefix, the shorter one appears first.
ComparePart
Compares two substrings.
This method considers a null
string to be less than a non-null
one. Shorter strings are also considered less than longer ones.
ContainsAt
Checks if the given string value in contains the given part in at the specified offset in.
DefaultIfEmptyOrWhitespace
Returns the given default value if value in is null
, has a length of 0
or contains only whitespace characters.
Equals
Checks if the given string values are equal (case-sensitive).
This method is intended for being used as an equality delegate.
EqualsNoCase
Checks if the given string values are equal (case-insensitive).
This method is intended for being used as an equality delegate.
- See also
Hash
Computes a hash code for the given string, using HashUtil.Str (case-sensitive).
This method is intended for being used as a hash code delegate.
HashNoCase
Computes a hash code for the given string, using HashUtil.Str (case-insensitive).
This method is intended for being used as a hash code delegate.
- See also
IsEmpty
Checks if the given string is empty.
A string is considered empty if it is null
or has a length or 0
.
IsEmptyOrWhitespace
Checks if the given string is empty or whitespace.
A string is considered empty or whitespace. if it is null
, has a length or 0
or contains only whitespace characters.
NumberParse
Parses the given regular floating point number (as defined by the float
rule described by Parse.ParseGrammar, excluding NaN
or Inf
).
- See also
ToCamelCase
Generates a camel case name from the given input:
'SOME_NAME_WITH_UNDERSCORES'
=> 'SomeNameWithUnderscores'
ToLower
2 overloads
Returns the culture-invariant lowercase of the given character.
Returns the culture-invariant lowercase of the given string.