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
- 
  add0x(String value) → String 
- add the '0x' prefix to a hexadecimal string if it exists.
- 
  decode(List< int> value, {StringEncoding type = StringEncoding.utf8, bool allowInvalidOrMalformed = false}) → String
- 
  Decodes a list of bytes valueinto a string using the specifiedtype.
- 
  encode(String value, {StringEncoding type = StringEncoding.utf8}) → List< int> 
- 
  Encodes the given valuestring into a list of bytes using the specifiedtype.
- 
  fromJson(Object data, {String? indent, bool toStringEncodable = false, Object? toEncodable(dynamic)?}) → 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<T> (Object? data, {Object? reviver(Object?, Object?)?}) → T 
- Converts a JSON-encoded string to a Dart object represented as a Map.
- 
  tryDecode(List< int> ? value, {StringEncoding type = StringEncoding.utf8, bool allowInvalidOrMalformed = false}) → String?
- 
  Decodes a list of bytes valueinto a string using the specifiedtypeif possible.
- 
  tryEncode(String? value, {StringEncoding type = StringEncoding.utf8}) → List< int> ?
- 
  Encodes the given valuestring into a list of bytes using the specifiedtypeif possible.
- 
  tryFromJson(Object? data, {String? indent, bool toStringEncodable = false, Object? toEncodable(dynamic)?}) → String? 
- Converts a Dart object represented as a Map to a JSON-encoded string if possible.
- 
  tryToBytes(String? v) → List< int> ?
- 
  tryToJson<T> (Object? data, {Object? reviver(Object?, Object?)?}) → T? 
- Converts a JSON-encoded string to a Dart object represented as a Map if possible.