MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / FromString

Function FromString

types/token.go:60–68  ·  view source on GitHub ↗

FromString returns token's number.

(t string)

Source from the content-addressed store, hash-verified

58
59// FromString returns token's number.
60func FromString(t string) TokenType {
61 var i TokenType
62 for ; i < SupportTokenNumber; i++ {
63 if strings.EqualFold(TokenList[i], t) {
64 return i
65 }
66 }
67 return -1
68}
69
70// Listed returns if the token is listed in list.
71func (t *TokenType) Listed() bool {

Callers 3

showTokenBalanceFunction · 0.92
runTransferFunction · 0.92
TestTokenTypeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestTokenTypeFunction · 0.68