Mercurial > projects > dwt2
comparison base/src/java/lang/String.d @ 117:c81e3dc6b9ad
Added Phobos implementation of java.lang.String.codepointCount.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 17 Apr 2011 17:47:05 +0200 |
parents | b31c27b8e86d |
children | ff7053751d15 |
comparison
equal
deleted
inserted
replaced
116:3daece18b48e | 117:c81e3dc6b9ad |
---|---|
184 uint ate; | 184 uint ate; |
185 dchar[] res = tango.text.convert.Utf.toString32( str, buf, &ate ); | 185 dchar[] res = tango.text.convert.Utf.toString32( str, buf, &ate ); |
186 assert( ate is str.length ); | 186 assert( ate is str.length ); |
187 return res.length; | 187 return res.length; |
188 } else { // Phobos | 188 } else { // Phobos |
189 implMissing( __FILE__, __LINE__ ); | 189 return std.utf.count(str); |
190 return 0; | |
191 } | 190 } |
192 } | 191 } |
193 | 192 |
194 //alias tango.text.convert.Utf.toString16 toString16; | 193 //alias tango.text.convert.Utf.toString16 toString16; |
195 //alias tango.text.convert.Utf.toString toString; | 194 //alias tango.text.convert.Utf.toString toString; |