Formerly NeoVier/elm-eos. Search finds this package by either name.
Name is a very fundamental basic type of EOSIO. It is used to identify accounts, permissions, actions, tables, etc.
StringConvert a Name to a regular String. This is useful if you want to
display names in your application.
fromString "eosio.token"
|> Result.map toString
--> Ok "eosio.token"Convert a regular String into a Name. Since there are some
restrictions on the possible names, this function can fail with an Error.
fromString "eosio.token"
|> Result.map toString
--> Ok "eosio.token"
fromString "0123456789"
--> Err (InvalidCharacters ( '0', [ '6', '7', '8', '9' ] ))
fromString "eosio."
--> Err DotInLastPlace
fromString ""
--> Err TooShort
fromString "a.very.long.name"
--> Err TooLongThe Error type represents all of the possible errors when converting a Name
fromString.
fromString "0123456789"
--> Err (InvalidCharacters ( '0', [ '6', '7', '8', '9' ] ))
fromString "eosio."
--> Err DotInLastPlace
fromString ""
--> Err TooShort
fromString "a.very.long.name"
--> Err TooLongYou can use this function to convert an Error into a human-readable
String.
Names are strings of up to 12 characters in length. They can include characters a-z, 1-5, and the dot character (except for the last character).
In order to generate a
Name, you can use fromString or decoder.To display a
Name, use the toString function. You can also encode aName