1 The `b64enc()` function encodes the given input string as base64. 2 3 Returns a string containing the encoded data. 4 5 Returns `null` if the input is not a string. 6 7 -- Testcase -- 8 {% 9 printf("%.J\n", [ 10 b64enc("Hello, world!"), 11 b64enc("\u0000\u0001\u0002\u0003"), 12 b64enc(""), 13 b64enc(true) 14 ]); 15 %} 16 -- End -- 17 18 -- Expect stdout -- 19 [ 20 "SGVsbG8sIHdvcmxkIQ==", 21 "AAECAw==", 22 "", 23 null 24 ] 25 -- End --
This page was automatically generated by LXR 0.3.1. • OpenWrt