IdentifierFromString creates an identifier from a string
(id string)
| 24 | |
| 25 | // IdentifierFromString creates an identifier from a string |
| 26 | func IdentifierFromString(id string) Identifier { |
| 27 | l := len(id) |
| 28 | if l > 0 && id[0] == '"' { |
| 29 | return Identifier{id: id[1 : l-1], ignoreCase: false} |
| 30 | } else { |
| 31 | return Identifier{id: id, ignoreCase: true} |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // correctly compares an identifier with a string |
| 36 | func (i Identifier) equal(id string) bool { |
no outgoing calls