StringUtils class
A utility class for working with strings and common string operations.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decode(
List< int> value, [StringEncoding type = StringEncoding.utf8, bool allowInvalidOrMalformed = false]) → String -
Decodes a list of bytes
value
into a string using the specifiedtype
. -
encode(
String value, [StringEncoding type = StringEncoding.utf8]) → List< int> -
Encodes the given
value
string into a list of bytes using the specifiedtype
. -
fromJson(
Object data) → String - Converts a Dart object represented as a Map to a JSON-encoded string.
-
isHexBytes(
String v) → bool -
ixHexaDecimalNumber(
String v) → bool -
strip0x(
String value) → String - Removes the '0x' prefix from a hexadecimal string if it exists.
-
toBytes(
String v) → List< int> -
toJson(
String data) → dynamic - Converts a JSON-encoded string to a Dart object represented as a Map.
-
tryDecode(
List< int> ? value, [StringEncoding type = StringEncoding.utf8]) → String? -
tryEncode(
String? value, [StringEncoding type = StringEncoding.utf8]) → List< int> ? -
tryToBytes(
String? v) → List< int> ?