Top Description Fields Constructors Methods
com.ibm.icu.impl

public final Class PatternProps

extends Object
Class Inheritance

Implements the immutable Unicode properties Pattern_Syntax and Pattern_White_Space. Hardcodes these properties, does not load data, does not depend on other ICU classes.

Note

Both properties include ASCII as well as non-ASCII, non-Latin-1 code points, and both properties only include BMP code points (no supplementary ones). Pattern_Syntax includes some unassigned code points.

[:Pattern_White_Space:] = [ - \ ‎‏ ]

[:Pattern_Syntax:] = [!-/\:-@\[-\^`\{-~¡-§©«¬® °±¶»¿×÷ ‐-‧‰-‾⁁-⁓⁕-⁞ ←-⑟─-❵➔-⯿⸀-⹿ 、-〃〈-〠〰﴾﴿﹅﹆]

Author
mscherer

Field Summary

Modifier and TypeField and Description
private static final byte[]
private static final byte[]
private static final int[]
private static final int[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true if there are no Pattern_White_Space or Pattern_Syntax characters in s.
isIdentifier
(CharSequence s)

Tests whether the CharSequence contains a "pattern identifier", that is, whether it contains only non-Pattern_White_Space, non-Pattern_Syntax characters.

public static boolean

Returns:

true if there are no Pattern_White_Space or Pattern_Syntax characters in s between start and (exclusive) limit.
isIdentifier
(CharSequence s, int start, int limit)

Tests whether the CharSequence contains a "pattern identifier", that is, whether it contains only non-Pattern_White_Space, non-Pattern_Syntax characters.

public static boolean

Returns:

true if c is a Pattern_Syntax code point.
isSyntax
(int c)

public static boolean

Returns:

true if c is a Pattern_Syntax or Pattern_White_Space code point.
isSyntaxOrWhiteSpace
(int c)

public static boolean

Returns:

true if c is a Pattern_White_Space character.
isWhiteSpace
(int c)

public static int

Returns:

The smallest index at or after i with a Pattern_White_Space or Pattern_Syntax character.
skipIdentifier
(CharSequence s, int i)

Skips over a "pattern identifier" starting at index i of the CharSequence.

public static int

Returns:

The smallest index at or after i with a non-white space character.
skipWhiteSpace
(CharSequence s, int i)

Skips over Pattern_White_Space starting at index i of the CharSequence.

public static String

Returns:

s except with leading and trailing SpaceChar characters removed.
trimSpaceChar
(String s)

public static String

Returns:

s except with leading and trailing Pattern_White_Space removed.
trimWhiteSpace
(String s)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

index2000back to summary
private static final byte[] index2000
latin1back to summary
private static final byte[] latin1
syntax2000back to summary
private static final int[] syntax2000
syntaxOrWhiteSpace2000back to summary
private static final int[] syntaxOrWhiteSpace2000

Constructor Detail

PatternPropsback to summary
public PatternProps()

Method Detail

isIdentifierback to summary
public static boolean isIdentifier(CharSequence s)

Tests whether the CharSequence contains a "pattern identifier", that is, whether it contains only non-Pattern_White_Space, non-Pattern_Syntax characters.

Returns:boolean

true if there are no Pattern_White_Space or Pattern_Syntax characters in s.

isIdentifierback to summary
public static boolean isIdentifier(CharSequence s, int start, int limit)

Tests whether the CharSequence contains a "pattern identifier", that is, whether it contains only non-Pattern_White_Space, non-Pattern_Syntax characters.

Returns:boolean

true if there are no Pattern_White_Space or Pattern_Syntax characters in s between start and (exclusive) limit.

isSyntaxback to summary
public static boolean isSyntax(int c)
Returns:boolean

true if c is a Pattern_Syntax code point.

isSyntaxOrWhiteSpaceback to summary
public static boolean isSyntaxOrWhiteSpace(int c)
Returns:boolean

true if c is a Pattern_Syntax or Pattern_White_Space code point.

isWhiteSpaceback to summary
public static boolean isWhiteSpace(int c)
Returns:boolean

true if c is a Pattern_White_Space character.

skipIdentifierback to summary
public static int skipIdentifier(CharSequence s, int i)

Skips over a "pattern identifier" starting at index i of the CharSequence.

Returns:int

The smallest index at or after i with a Pattern_White_Space or Pattern_Syntax character.

skipWhiteSpaceback to summary
public static int skipWhiteSpace(CharSequence s, int i)

Skips over Pattern_White_Space starting at index i of the CharSequence.

Returns:int

The smallest index at or after i with a non-white space character.

trimSpaceCharback to summary
public static String trimSpaceChar(String s)
Returns:String

s except with leading and trailing SpaceChar characters removed.

trimWhiteSpaceback to summary
public static String trimWhiteSpace(String s)
Returns:String

s except with leading and trailing Pattern_White_Space removed.