WordStartSearchPattern (クラス)
public WordStartSearchPattern {inherits SearchPattern}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.BASE.

単語の始まりを検索するために使用されるクラス。

説明

この基本クラスは非常に基本的な一致基準を実装します。カスタムの一致基準を実装するために、開発者はこのクラスをサブクラス化する必要があります。

注意事項

基本実装では Unicode 文字を一致させますが、異なる Unicode 値を持ちながら「規則上では同等」である文字は一致しても記録されません。

プロパティ
プロパティ 継承 SearchPattern: text-search-pattern

メソッド
search-backward:単語の始まりを後ろ向きに検索します。
public {WordStartSearchPattern.search-backward
s:StringInterface,
end-index:int,
search-limit:int = 0
}:(found?:bool, match-location:int)
search-forward:単語の始まりを前向きに検索します。
public {WordStartSearchPattern.search-forward
s:StringInterface,
start-index:int,
search-limit:int = s.size
}:(found?:bool, match-location:int)
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize




プロパティ詳細


メソッド詳細
search-backward (メソッド)
public {WordStartSearchPattern.search-backward
s:StringInterface,
end-index:int,
search-limit:int = 0
}:(found?:bool, match-location:int)

単語の始まりを後ろ向きに検索します。

s: 検索を行う文字列。
end-index: 検索を開始する s のインデックス。検索は、この位置から小さいインデックス値に向かって行われます。
search-limit: s 内でこのインデックスより先に検索を行いません。

戻り値

最初の戻り値は、単語の開始位置が見つかったかどうかを示す bool 値です。2番目の値は、s の単語の最初の文字のインデックスです。


search-forward (メソッド)
public {WordStartSearchPattern.search-forward
s:StringInterface,
start-index:int,
search-limit:int = s.size
}:(found?:bool, match-location:int)

単語の始まりを前向きに検索します。

s: 検索を行う文字列。
start-index: 検索を開始する s のインデックス。
search-limit: s 内でこのインデックスより先に検索を行いません。

戻り値

最初の戻り値は、単語の開始位置が見つかったかどうかを示す bool 値です。2番目の値は、s の単語の最初の文字のインデックスです。