method Utf8.encode
The UTF-8 bytes of a text.
Example:
fn main() io {
print("{Utf8.encode("hi").len()}")
}Вывод
2
pub(api) static fn encode(text: str) -> bytesС версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
text | str |
Возвращает
bytes
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/text.oxl:1050