I recently found the code below:
var noEscape = [256]bool{
'A': true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
'a': true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
'0': true, true, true, true, true, true, true, true, true, true,
'-': true,
'.': true,
'_': true,
'~': true,
}
I understand that this [N]bool
is initialized with N false
(zeros) by default. And if the index followed by a colon is specified values can are defined form the index (inclusive). Where is it described? What types can be used as an index value (there is a char
in the example)?