• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2002-2003, International Business Machines Corporation and
2# others. All Rights Reserved.
3#
4#  Title Casing Break Rules
5#
6
7$CaseIgnorable   = [[:Mn:][:Me:][:Cf:][:Lm:][:Sk:] \u0027 \u00AD \u2019];
8$Cased           = [[:Upper_Case:][:Lower_Case:][:Lt:]  - $CaseIgnorable];
9$NotCased        = [^ $Cased];
10
11#
12#  If the iterator was not stopped on a cased character, advance it to the first cased char
13#
14$NotCased+;
15
16#
17#  If the iterator starts on a cased item, advance through all adjacent cased items plus
18#    any non-cased stuff, to reach the start of the next word.
19#
20$Cased ($Cased | $CaseIgnorable)* $NotCased*;
21
22#
23#  Reverse Rules
24#
25
26! $NotCased+;
27
28#
29#  If the iterator starts on a cased item, advance through all adjacent cased items plus
30#    any non-cased stuff, to reach the start of the next word.
31#
32! $NotCased* ($Cased | $CaseIgnorable)* $Cased;