docs

bare::ffi::objc::string

本页内容

API 参考只有英文版,由标准库源代码中的英文文档注释生成。

NSString and str. Both copy: an NSString holds UTF-16, a str UTF-8.

Structs

NSStringSource

pub struct NSString

NSString, Foundation's string class: a program using it links Foundation (#[link(name = "Foundation", kind = "framework")]).

  • pub fn from_str(s: str) -> Id<NSString>§

    Source

    An NSString holding a copy of s.

Trait implementations 1

Functions

nsSource

pub fn ns(s: str) -> Id<NSString>

NSString::from_str(s), short: ns("text").

Implementations

impl Id

  • pub fn to_str(self) -> str§

    Source

    The text as a str, copied. An unpaired UTF-16 surrogate, which UTF-8 cannot hold, becomes U+FFFD.