Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Unicode decompose: aCharacter
Last updated at 9:36 pm UTC on 18 December 2015
A class method of Class Unicode

decompose: aCharacter
	"Answers the decomposed sequence for the given character if such a sequence
	exists. If there is no decomposition for the character, answer nil."
	^String withAll: ((Decompositions at: aCharacter asInteger ifAbsent:[^nil]) 
		collect:[:v| Character value: v]).


In Squeak 4.6 and 5.0

(Unicode decompose: $é) class  
    WideString

(Unicode decompose: $é) size 
    2

(Unicode decompose: $é) asOrderedCollection collect: [:code | code asInteger] 
 an OrderedCollection(101 769)

(Unicode decompose: $ö) asOrderedCollection collect: [:code | code asInteger] 
 an OrderedCollection(111 776) 



See also