|
81 | 81 | Mongolian Vowel Sep count F: (should align) |
82 | 82 | */ |
83 | 83 |
|
84 | | -/* */ /* |
85 | | - Hello from offset 6 |
86 | | - Space 6+2: compare A |
87 | | - Mongolian Vowel Separator 6+2: compare B |
88 | | - */ |
89 | | -/**/ /* |
90 | | - Hello from another offset 6 with wchars establishing column offset |
91 | | - Space 6+2: compare C |
92 | | - Mongolian Vowel Separator 6+2: compare D |
93 | | - */ |
| 84 | + |
| 85 | + |
| 86 | + /* */ |
| 87 | + |
| 88 | + /* |
| 89 | + Hello from offset 6 |
| 90 | + Space 6+2: compare A |
| 91 | + Mongolian Vowel Separator 6+2: compare B |
| 92 | + */ |
| 93 | + |
| 94 | + /**/ |
| 95 | + |
| 96 | + /* |
| 97 | + Hello from another offset 6 with wchars establishing column offset |
| 98 | + Space 6+2: compare C |
| 99 | + Mongolian Vowel Separator 6+2: compare D |
| 100 | + */ |
94 | 101 | } |
95 | 102 |
|
96 | 103 | fn main() { |
97 | 104 | // Taken from http://en.wikipedia.org/wiki/Whitespace_character |
98 | | - let chars = [ '\x0A', '\x0B', '\x0C', '\x0D', '\x20', |
99 | | - // '\x85', // for some reason Rust thinks NEL isn't whitespace |
100 | | - '\xA0', '\u1680', '\u180E', |
101 | | - '\u2000', '\u2001', '\u2002', '\u2003', |
102 | | - '\u2004', '\u2005', '\u2006', '\u2007', |
103 | | - '\u2008', '\u2009', '\u200A', |
104 | | - '\u2028', '\u2029', '\u202F', '\u205F', |
105 | | - '\u3000' |
106 | | - ]; |
| 105 | + let chars = |
| 106 | + ['\x0A', '\x0B', '\x0C', '\x0D', '\x20', |
| 107 | + // '\x85', // for some reason Rust thinks NEL isn't whitespace |
| 108 | + '\xA0', '\u1680', '\u180E', '\u2000', '\u2001', '\u2002', '\u2003', |
| 109 | + '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A', |
| 110 | + '\u2028', '\u2029', '\u202F', '\u205F', '\u3000']; |
| 111 | + // <= bugs in pretty-printer? |
107 | 112 | for vec::each(chars) |c| { |
108 | | - io::println(fmt!("%? %?", c, c.is_whitespace())); |
| 113 | + let ws = c.is_whitespace(); |
| 114 | + io::println(fmt!("%? %?" , c , ws)); |
109 | 115 | } |
110 | 116 | } |
0 commit comments