I have been doing a few C extensions and have noticed some strings I have to use
as(Pointer(UInt8). This is not too annoying and can extracted to method and stuff. But I was wondering why. This seems to be like an alias and I dont know why this is a problem. Seems like some of the C extensions in the lib return
Char* and work. Also looking into submitting a patch it looks like it would change some fundamental APIs. Would it be of benefit to more
String to use
Char instead of
UInt8? It seems like it is the fundamental unit that String is based on.
p = Pointer(Char).new(3) p = 'a' p = '\0' p = 'b' s = String.new(p, 3)