iOS 基础类解析 - NSCharacterSet

简介: iOS 基础类解析 - NSCharacterSet 太阳火神的美丽人生 (http://blog.csdn.net/opengl_es) 本文遵循“署名-非商业用途-保持一致”创作公用协议 转载请保留此句:太阳火神的美丽人生 -  本博客专注于 敏捷开发及移动和物联设备研究:iOS、Android、Html5、Arduino、pcDuino,否则,出自本博客的文章拒绝转载或再转载,谢谢合作。

iOS 基础类解析 - NSCharacterSet

太阳火神的美丽人生 (http://blog.csdn.net/opengl_es)

本文遵循“署名-非商业用途-保持一致”创作公用协议

转载请保留此句:太阳火神的美丽人生 -  本博客专注于 敏捷开发及移动和物联设备研究:iOS、Android、Html5、Arduino、pcDuino否则,出自本博客的文章拒绝转载或再转载,谢谢合作。


NSCharacterSet Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/ Foundation.framework
Availability
Available in iOS 2.0 and later.
Companion guide
Declared in
NSCharacterSet.h
NSURL.h
Related sample code

Overview

An NSCharacterSet object represents a set of Unicode-compliant characters. NSString and NSScanner objects use NSCharacterSet objects to group characters together for searching operations, so that they can find any of a particular set of characters during a search. The cluster’s two public classes, NSCharacterSet andNSMutableCharacterSet, declare the programmatic interface for static and dynamic character sets, respectively.

The objects you create using these classes are referred to as character set objects (and when no confusion will result, merely as character sets). Because of the nature of class clusters, character set objects aren’t actual instances of the NSCharacterSet or NSMutableCharacterSet classes but of one of their private subclasses. Although a character set object’s class is private, its interface is public, as declared by these abstract superclasses, NSCharacterSet and NSMutableCharacterSet. The character set classes adopt the NSCopying and NSMutableCopying protocols, making it convenient to convert a character set of one type to the other.

The NSCharacterSet class declares the programmatic interface for an object that manages a set of Unicode characters (see the NSString class cluster specification for information on Unicode). NSCharacterSet’s principal primitive method, characterIsMember:, provides the basis for all other instance methods in its interface. A subclass of NSCharacterSet needs only to implement this method, plus mutableCopyWithZone:, for proper behavior. For optimal performance, a subclass should also override bitmapRepresentation, which otherwise works by invoking characterIsMember: for every possible Unicode value.

NSCharacterSet is “toll-free bridged” with its Core Foundation counterpart, CFCharacterSetRef. See “Toll-Free Bridging” for more information on toll-free bridging.

The mutable subclass of NSCharacterSet is NSMutableCharacterSet.

Adopted Protocols




Copyright © 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-03-10




目录
相关文章
|
19天前
|
安全 Java
并发编程之常见线程安全类以及一些示例的详细解析
并发编程之常见线程安全类以及一些示例的详细解析
13 0
|
2月前
|
存储 C++ 容器
C++入门指南:string类文档详细解析(非常经典,建议收藏)
C++入门指南:string类文档详细解析(非常经典,建议收藏)
44 0
|
2月前
|
XML 存储 Java
Spring重要类解析
Spring重要类解析
23 0
|
2月前
|
存储 算法 API
【Qt 基本类】QDateTime类在C++中的应用与深度解析
【Qt 基本类】QDateTime类在C++中的应用与深度解析
45 0
|
21天前
|
设计模式 监控 前端开发
深入解析iOS中的并发编程模式
【4月更文挑战第20天】 在当今移动应用开发中,提升程序的响应性和性能是至关重要的。特别是在iOS平台上,合理利用多线程和并发编程技术可以显著改善用户体验。本文旨在探讨几种在iOS开发中广泛使用的并发编程模式,包括线程、GCD(Grand Central Dispatch)、Operation Queues以及异步设计模式等。通过对这些技术的深入分析与比较,我们不仅将揭示各自的优势和潜在缺陷,还会展示如何结合它们以解决实际开发中遇到的并发挑战。
|
22天前
|
数据安全/隐私保护 C++
C++ 类方法解析:内外定义、参数、访问控制与静态方法详解
C++ 中的类方法(成员函数)分为类内定义和类外定义,用于操作类数据。类内定义直接在类中声明和定义,而类外定义则先在类中声明,再外部定义。方法可以有参数,访问权限可通过 public、private 和 protected 控制。静态方法与类关联,不依赖对象实例,直接用类名调用。了解这些概念有助于面向对象编程。
16 0
|
29天前
|
Java
Java 15 神秘登场:隐藏类解析未知领域
Java 15 神秘登场:隐藏类解析未知领域
21 0
|
1月前
|
消息中间件 安全 Java
解析KafkaConsumer类的神奇之道
解析KafkaConsumer类的神奇之道
16 0
|
1月前
|
XML Java 数据格式
java使用Document类解析xml并创建子标签节点
java使用Document类解析xml并创建子标签节点
|
1月前
|
监控 JavaScript 前端开发

推荐镜像

更多