访问属性
一个 attributed string 识别属性 by 名字, 在一个Map(which 是 依次和一个 NSRange[它显示 characters {字符- >那个map请求的字符}] 有关)中在对应的属性名下存储值.除了标准的属性外,你能分配一个范围的字符串给任何属性名-值对。
取回/检索属性值
拥有一个非可变的 attributed string,在创造它的时候,你分配所有的属性.In Java,你用构造函数,In OC, 你用
比如"initWithString:attributes"(which 采用NSDictionary管理name-value对)的方法,或"initWithString"(which 分配no属性),And Application Kit对NSAttributedString的扩展采用一个RTF或HTML文件增加方法;可以通过看"Changing an Attributed String"得到关于分配给一个 mutable attributed string 的信息。
为了从任何类型的 attributed string得到属性值, 用任何一个这些方法{
attributesAtIndex:effectiveRange:
attributesAtIndex:longestEffectiveRange:inRange:
attribute:atIndex:effectiveRange:
attribute:atIndex:longestEffectiveRange:inRange:
fontAttt=ributesInRange
rulerAttributesInRange:}
这首先的两个方法在给定的index上返回所有属性,这 attribute:....方法返回单个被命名的属性的值,The Application Kit对NSAttributedString的扩展增加了"fontAttributesInRange:"和"rulerAttributesInRange"(which 返回 被定义去分别仅运用/申请字符串或整个段落)。
这首先的四个方法也通过参照属性的有效范围和最长的有效范围进行返回。这些范围允许你去确认属性的范围。在概念上,在 attributed string 中的每个字符串都有它自己的属性集合,当在一系列字符串中属性和值是一样的情况下,知道它是非常有用的。这允许一个例行程序通过在块中的的 attributed string 而不是单个字符运行;在检索有效的范围时,一个 attributed string 简单的查阅在它的属性map中的信息(map 本质上是适用于请求的index的dictionary),在检索最长的有效range时,这 attributed string 继续检查字符串通过这基本的range只要这attribute的值是一样的。这额外的比较增加了执行的时间(which for 这些方法,但是保证了精确全面的被要求的属性范围);
有效的全面的范围
那些通过引用返回有效范围的方法是不担保返回最全面的范围(which 属性请求),他们只是保证返回相同的范围相对于他们请求的。在实践中,他们会返回任何范围(which 是 容易的 可得到的 从 attributed string 的内部 存储 机制 [which 可能依赖于这些实现和在精确的历史修改 to attributed string]);
那些通过引用返回最长有效范围的方法,在另一方面, 是保证了发回在传入的的参数值for in range 里面返回最长的范围包含指定的索引。for 效率,它(多么重要 inRange中的参数尽量合适interest to the client)
相关推荐
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
However, AODE does not consider the relations between super-parent attribute with other normal attributes. In this paper, we propose a method based on AODE which weighted the relationship between the...
官方离线安装包,亲测可用
Using the method of maximizing deviations to multiple attribute decision making under interval-valued intuitionistic fuzzy environment,卫贵武,,With respect to multiple attribute decision making ...
Attribute-Based and Value-Based Clustering An Evaluation
ruby-oo-fundamentals-attribute-accessors-lab-wdc01-seng-ft-060120-源码.rar
ruby-oo-fundamentals-attribute-accessors-lab-sea01-seng-ft-071320-master.rar
-x attributes String to insert as table attributes -y attributes String to insert as tr attributes -z attributes String to insert as td or th attributes -C attribute Add cookie, eg. 'Apache=1234'....
资源来自pypi官网。 资源全名:attribute_dict-1.0.0-py3-none-any.whl
这是一个简单的例子: use Spatie \ RouteAttributes \ Attributes \ Get ;class MyController{ #[Get('my-route')] public function myMethod () { }} 此属性将自动注册以下路线: Route :: get ( 'my-route' , [ ...
Laravel开发-platform-attributes-lang-cs 捷克本地化到Cartalist平台
资源分类:Python库 所属语言:Python 资源全名:easy_module_attribute_getter-0.9.13-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源分类:Python库 所属语言:Python 资源全名:easy_module_attribute_getter-0.9.11-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
Attribute Value Weighting in K-Modes Clustering,何增友,,In this paper, the traditional k-modes clustering algorithm is extended by weighting attribute value matches in dissimilarity computation....
基于python的人脸识别项目
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
Laravel开发-attributes Cortex属性是用于Laravel雄辩的健壮、智能和集成的实体属性值模型(EAV)实现的前端层,具有强大的底层功能,可以轻松地将实体属性隐式管理为关系。它利用了Laravel雄辩的力量,平滑无缝的...