CharClass (クラス)
public CharClass {inherits CharClassInterface, {CharMap bool}}
パッケージ: CURL.LANGUAGE.STRINGS

不変文字列。主な目的は、セット内のメンバシップに関するクエリを効率的に処理することです。CharClass.member? を参照してください。

プログラミング注意事項

CharClass は、一連の CharClassInterfaceString 引数によって初期化されます。CharClass は、これらの組み合わせを効率的な内部式で記録し、CharClass.member? によるクエリを処理できるようにします。

コンストラクタ
default:新しい CharClass を初期化します。
コンストラクタ public {CharClass.default ...:any}
from-any:charStringCharClass、または WCharClass から CharClass を新規に作成します。
ファクトリ public implicit {CharClass.from-any arg:any}:CharClass

プロパティ
プロパティ 継承 CharMapInterface: mutable?

クラス変数と定数
digit-chars:ASCII 数字 ('0' から '9' までの値) を含む CharClass を提供します。
public constant CharClass.digit-chars:CharClass ={make-digit-chars}
letter-chars:Unicode 文字の文字列を格納する CharClass
public constant CharClass.letter-chars:CharClass ={make-letter-chars}
whitespace-chars:Unicode の空白文字 (値 '\u0009'、'\u000A'、'\u000B'、'\u000C'、'\u000D'、'\u0020' および非 ASCII のホワイト文字値) を含む CharClass を提供します。
public constant CharClass.whitespace-chars:CharClass ={make-whitespace-chars}

メソッド
clone-writable:このクラスを可変バージョンに変換します。返されたオブジェクトに対して変更を加えても、元のオブジェクトは変更されません。
public {CharClass.clone-writable}:WritableCharClass
complement-clone:self の補集合を含むクローンを返します。
public {CharClass.complement-clone}:CharClass
difference-clone:self とゼロ個以上の CharClassInterface の差集合を含むクローンを返します。
public {CharClass.difference-clone ...:CharClassInterface}:CharClass
fold:指定されたプロシージャに従ってマッピングされたメンバ文字を持つ、CharClassInterface を新規に作成します。
public {CharClass.fold
folder:{proc-type {char}:char}
}:CharClassInterface
intersect-clone:self とゼロ個以上の CharClassInterface の積集合を含むクローンを返します。
public {CharClass.intersect-clone ...:CharClassInterface}:CharClass
member?:ある文字がこのクラスのメンバであるかどうかを判断します。その文字がメンバであるばあいにのみ true を返します。
public final inline {CharClass.member? ch:char}:bool
union-clone:self とゼロ個以上の CharClassInterface の和集合を含むクローンを返します。
public {CharClass.union-clone ...:CharClassInterface}:CharClass
メソッド 継承 CharClassInterface: to-Iterator
メソッド 継承 _WCharMap: get
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {CharClass.default ...:any}

新しい CharClass を初期化します。



from-any (ファクトリ)
public implicit {CharClass.from-any arg:any}:CharClass

charStringCharClass、または WCharClass から CharClass を新規に作成します。




プロパティ詳細
クラス変数と定数の詳細
digit-chars (クラス定数)
public constant CharClass.digit-chars:CharClass ={make-digit-chars}

ASCII 数字 ('0' から '9' までの値) を含む CharClass を提供します。



letter-chars (クラス定数)
public constant CharClass.letter-chars:CharClass ={make-letter-chars}

Unicode 文字の文字列を格納する CharClass



whitespace-chars (クラス定数)
public constant CharClass.whitespace-chars:CharClass ={make-whitespace-chars}

Unicode の空白文字 (値 '\u0009'、'\u000A'、'\u000B'、'\u000C'、'\u000D'、'\u0020' および非 ASCII のホワイト文字値) を含む CharClass を提供します。





メソッド詳細
clone-writable (メソッド)
public {CharClass.clone-writable}:WritableCharClass

このクラスを可変バージョンに変換します。返されたオブジェクトに対して変更を加えても、元のオブジェクトは変更されません。

戻り値

self のメンバと同じメンバを持つ WritableCharClass


complement-clone (メソッド)
public {CharClass.complement-clone}:CharClass

self の補集合を含むクローンを返します。

戻り値

CharClassInterface のインスタンス。

説明

selffalse である文字に対しては true、かつ selftrue である文字に対しては false となるクローンを返します。

注意事項

返される型が self と異なる場合もあります。


difference-clone (メソッド)
public {CharClass.difference-clone ...:CharClassInterface}:CharClass

self とゼロ個以上の CharClassInterface の差集合を含むクローンを返します。

...: 残余引数には、差集合の形成に使う CharClassInterface を指定します。

戻り値

CharClassInterface のインスタンス。

説明

selftrue、かつすべての引数が false である文字のそれぞれに対して、true となるクローンを返します。

注意事項

返される型が self と異なる場合もあります。


fold (メソッド)
public {CharClass.fold
folder:{proc-type {char}:char}
}:CharClassInterface

指定されたプロシージャに従ってマッピングされたメンバ文字を持つ、CharClassInterface を新規に作成します。

folder: メンバ文字をマッピングするプロシージャ。folder は、このクラスのメンバである各文字に対して 1 回呼び出されます。

戻り値

返される CharClassInterface に含まれる文字は、folder によって少なくとも 1 回返された文字だけです。

説明

返される CharClassInterface の中に含まれるメンバ文字が、元のオブジェクトよりも多くなることはありません。

注意事項

これは、CharClassInterface.complement-clone で作成される CharClassInterface など、1 つ以上の CharClassInterface の多数の値を、true にマッピングされる多数の文字で繰り返し処理することができます。


intersect-clone (メソッド)
public {CharClass.intersect-clone ...:CharClassInterface}:CharClass

self とゼロ個以上の CharClassInterface の積集合を含むクローンを返します。

...: 残余引数には、積集合の形成に使う CharClassInterface を指定します。

戻り値

CharClassInterface のインスタンス。

説明

self かつすべての引数が true となる文字に対して、それぞれ true となるクローンを返します。

注意事項

返される型が self と異なる場合もあります。


member? (メソッド)
public final inline {CharClass.member? ch:char}:bool

ある文字がこのクラスのメンバであるかどうかを判断します。その文字がメンバであるばあいにのみ true を返します。

ch: このクラスのメンバであるかどうかが検査される文字。


union-clone (メソッド)
public {CharClass.union-clone ...:CharClassInterface}:CharClass

self とゼロ個以上の CharClassInterface の和集合を含むクローンを返します。

...: 残余引数には、和集合の形成に使う CharClassInterface を指定します。

戻り値

CharClassInterface のインスタンス。

説明

self またはすべての引数が true となる文字のそれぞれに対して、true となるクローンを返します。

注意事項

返される型が self と異なる場合もあります。