From: Harry M. <har...@go...> - 2009-01-18 22:55:08
|
Sorry if this is an obvious or stupid question, but I have been trying for some time to find a way of splitting a string into an array so that each character is a member of the array. I initially tried using ruby's somearray = somestring.split(//), but I got an error saying: NoMethodError: undefined method `empty?' for //:Regexp /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_attachments.rb:839:in `split' I then tried a Cocoa approach with the componentsSeparatedByCharactersInSet but it gave me an error also. Am I missing an obvious method of splitting a string into an array? |