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

method Path.withExtension

The path with its extension replaced by ext (added when there is none).

Example:

oxl✓ проверяется в CI
use std.io { Path }

fn main() io {
  print(Path.of("a/main.oxl").withExtension("o").text)
}
Вывод
a/main.o
pub(api) fn withExtension(ext: str) -> Path

С версии. 1.0.0-beta

Параметры

ИмяТип
extstr

Возвращает

Path

Эффекты

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

Определено в: std/io/io.oxl:976

См. также