[][src]Function glk::filename::to_os_string

pub fn to_os_string(buf: &[u8]) -> OsString

Filter name, convert from a sequence of raw bytes of (ostensibly) Latin-1 encoding to a native

  • OS name.
  • According to the spec, this should:
    • remove slash, backslash, angle brackets (less-than and greater-than), colon, double-quote, pipe (vertical bar), question-mark, asterisk
    • and truncate the argument at the first period (delete the first period)
    • if the result is the empty string, change it to the string 'null'
  • for good measure, also exclude non-ASCII and control characters.