method base64.decodeUrl
URL-safe alphabet; padding is optional.
Example:
use std.crypto { base64 }
use std.ser { textOf }
fn main() io {
print(textOf(&base64.decodeUrl("aGk")!)!)
}Вывод
hi
pub(api) static fn decodeUrl(text: str) -> bytes | DecodeErrorСложность. O(n).
С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
text | str |
Возвращает
bytes
Ошибки
DecodeError@error- `DecodeError` when the text has characters outside the URL-safe alphabet.
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/crypto/crypto.oxl:405