core :: Int :: to_base64_char
base64
equivalent of self
REQUIRE self
.is_base64_char
# Returns the `base64` equivalent of `self`
#
# REQUIRE `self`.`is_base64_char`
fun to_base64_char: Int do
if self == u'+' then return 62
if self == u'/' then return 63
if self > u'Z' then
if self < u'a' then abort
if self <= u'z' then return self - 71
abort
end
if self >= u'A' then return self - 0x41
if self <= u'9' and self >= u'0' then return self + 4
abort
end
lib/base64/base64.nit:43,2--57,4