a version of code points
strings and encodings are definitely not the same for mir and opal the code point version works for me with utf16 encoding (on my machine?) utf16 is sensible choice though may go with it
This commit is contained in:
parent
7c18ab3e36
commit
dee9eb4dca
@ -20,6 +20,21 @@ require "views/instruction_view"
|
||||
require "views/registers_view"
|
||||
class Bignum
|
||||
end
|
||||
class String
|
||||
def codepoints
|
||||
arr = []
|
||||
one = nil
|
||||
self.each_byte do |c|
|
||||
if( one )
|
||||
arr << (one + c * 256)
|
||||
one = nil
|
||||
else
|
||||
one = c
|
||||
end
|
||||
end
|
||||
arr
|
||||
end
|
||||
end
|
||||
class MainView < ListView
|
||||
include AST::Sexp
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user