1 # Copyright (C) 2016 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html#License
4 # Copyright (c) 2002-2015, International Business Machines Corporation and
5 # others. All Rights Reserved.
7 # Title Casing Break Rules
11 $CaseIgnorable = [[:Mn:][:Me:][:Cf:][:Lm:][:Sk:] \u0027 \u00AD \u2019];
12 $Cased = [[:Upper_Case:][:Lower_Case:][:Lt:] - $CaseIgnorable];
13 $NotCased = [[^ $Cased] - $CaseIgnorable];
17 # If the iterator begins on a CaseIgnorable, advance it past it/them.
18 # This can occur at the start-of-text, or after application of the
21 ($CaseIgnorable | $NotCased)*;
23 # Normal exact forward rule: beginning at the start of a word
24 # (at a cased character), advance through the word and through
25 # the uncased characters following the word.
27 $Cased ($Cased | $CaseIgnorable)* ($NotCased | $CaseIgnorable)*;
33 # Normal Rule, will work nearly universally, so long as there is a
34 # start-of-word preceding the current iteration position.
36 ($NotCased | $CaseIgnorable)* ($Cased | $CaseIgnorable)* $Cased;
38 # Short rule, will be effective only when moving to the start of text,
39 # with no word (cased character) preceding the current iteration position.
41 ($NotCased | $CaseIgnorable)*;
45 # Safe Reverse: the exact forward rule must not start in the middle
46 # of a word, so the safe reverse skips over any Cased characters,
47 # leaving it just before the start of a word.
49 ($Cased | $CaseIgnorable)*;
53 # Safe Forward, nothing needs to be done, the exact Reverse rules will
54 # always find valid boundaries from any starting position.
55 # Still, some rule is needed, so '.', a one character movement.