Click here to Skip to main content
15,888,802 members

Comments by yetibrain (Top 2 by date)

yetibrain 18-Feb-14 12:46pm View    
Take care with StringInfo's LengthInTextElements()! Usually it works fine, when you have surrogate pairs within your string, string's Length will always be higher than LengthInTextElements() but if there are orphaned surrogates (just a high or low surrogate on its own and NOT as a pair), usually these orphaned surrogates are NOT characters, but this method counts them anyway. This is wierd because surrogates are NOT characters that's why they are called surrogates. This method better not counts orphaned surrogates as text elements, rather the class should count orphaned low- as well as high-surrogates and provide properties accordingly.
yetibrain 18-Feb-14 7:50am View    
Great!