docs

您正在閱讀 v0.1.2 的文件。Nabi 0.1.2 已停止支援。 最新版本:v0.1.3 →

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.