Hello,
I face a problem when creating an AbstractString type. Maybe is not the best implementation. Nevertheless, I want to give it a try. Here is my toy-model which fails of course, because, it is not finished. I don’t know how to continue with it.
bitstype 32 MyChar
type MyString <: AbstractString
len::Int
MyString(arr::Array{MyChar,1}) = begin
# What should be go here?
x = new(length(arr))
end
end
# I'm only guessing
Base.endof(mystr::MyString) = mystr.len
Base.next(mystr::MyString, i::Int) = unsafe_load(pointer_from_objref(mystr), i+1)
x = reinterpret(MyChar, 0x00000000)
y = reinterpret(MyChar, 0x00000001)
mystr = MyString([x,y])
Thanks