【问题标题】:What is the Rust equivalent of Python os.pathsep?Python os.pathsep 的 Rust 等价物是什么?
【发布时间】:2017-04-10 22:21:21
【问题描述】:

Python 有:

os.pathsep: 操作系统通常使用的字符来分隔搜索路径组件(如在 PATH 中),例如 ':' 代表 POSIX 或 ';'对于 Windows。也可通过os.path 获得。

Rust 中是否有类似的特定于操作系统的定义?

【问题讨论】:

    标签: python path rust environment-variables


    【解决方案1】:

    这似乎没有一个常数,但 Rust 确实提供了 std:::env::split_pathsstd::env::join_paths

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-11
      • 2022-06-12
      • 2011-09-03
      • 2011-03-07
      • 2022-11-03
      • 2023-01-17
      相关资源
      最近更新 更多