VASmalltalk – ICU, RegularExpressions and Character support

With version 0.1.6 some of the regular expression API calls have been wrapped and you may now use regular expressions under Unicode.

| regMatcher pattern source result result2 |
	
pattern := 'ab*' asUtf16String.
source := 'ababab' asUtf16String.
regMatcher := URegularExpression 
                open: pattern 
                length: pattern size 
                flags: 0.
regMatcher text: source.
result := regMatcher allMatches.
regMatcher close.
self assert: (result = 3).	

In addition lots of Is????? like functions for instances of Characters have been wrapped e.g.: uIsalpha, uIsBlank, uIsJavaSpaceChar ….

That’s enough for today ….

This entry was posted in Smalltalk and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s