rb/lib/twitter-text/extractor.rb
# Helper function to convert this string into an array of unicode code points.
Helper function to convert this string into an array of unicode code points.
Helper function to convert this string into an array of unicode code points .
def to_codepoint_a
    @to_codepoint_a ||= if chars.kind_of?(Enumerable)
      chars.to_a
    else
      codepoint_array = []
      0.upto(codepoint_length - 1) { |i| codepoint_array << [chars.slice(i)].pack('U') }
      codepoint_array
    end
  end
def to_codepoint_a @to_codepoint_a ||= if chars . kind_of? ( Enumerable ) chars . to_a else codepoint_array = [ ] 0 . upto ( codepoint_length - 1 ) { | i | codepoint_array << [ chars . slice ( i ) ] . pack ( 'U' ) } codepoint_array end end
Helper function to convert this string into an array of unicode code points.
Helper function to convert this string into an array of unicode code points .