utils/utils
library
Functions
-
assertion(bool value, [String? msg])
→ void
-
Asserts if the
value
value is true or not
-
decodeHex(String value)
→ Uint8List
-
Decodes hex
value
and converts to Buffer of Uint8List
-
encodeHex(List<int> bytes)
→ String
-
Encodes buffer of list of integers
bytes
to hexa-decimal.
-
getArrayMatch(String typeString)
→ RegExpMatch?
-
Match the typeString with the regex
Example: '
u8; 10
' -> ['u8; 10
', 'u8', '10']
Example: '[u8; 2
; 100]' -> ['u8; 100
', 'u8; 2
', '100']
-
getArrowMatch(String typeString)
→ RegExpMatch?
-
Match the typeString with the regex
Example: 'Vec
-
getResultMatch(String typeString)
→ RegExpMatch?
-
Match the typeString with the regex
Example: 'Result<u8, bool>' ->
'Result<u8, bool>', 'Result', 'u8', 'bool'
Example: 'Result<Result<u8, bool>, bool>' -> 'Result<Result<u8, bool>, bool>', 'Result', 'Result<u8, bool>', 'bool'
-
parseTupleRegExp(String text)
→ List<String>
-
returns a list of strings from a tuple string