OxL Справочник OxL
РусскийEnglish

method base64.decodeUrl

URL-safe alphabet; padding is optional.

Example:

oxl✓ проверяется в CI
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

Параметры

ИмяТип
textstr

Возвращает

bytes

Ошибки

  • DecodeError @error
  • `DecodeError` when the text has characters outside the URL-safe alphabet.

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/crypto/crypto.oxl:405

См. также