docs

v0.1.0 문서를 보고 있습니다. 이 버전은 더 이상 지원하지 않습니다. 최신 릴리스: 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.