ark-lang / ark

A compiled systems programming language written in Go using the LLVM framework
https://ark-lang.github.io/
MIT License
682 stars 47 forks source link

How do I cast a u8 pointer into a string? #741

Closed danharbor95 closed 8 years ago

danharbor95 commented 8 years ago

Hello very nice job with the compiler thus far! i have been lurking and it has developed nicely

I was wondering how i would cast a byte or u8 pointer into a string for C compatibility?

kiljacken commented 8 years ago

Hello! Thanks for showing interest :)

We currently do not have a way to convert between ark strings (pascal style) and c string (zero terminated). We do however have plans for this. If you need them for playing around I could go code up some functions in a bit?

danharbor95 commented 8 years ago

oh ok what are the plans for this feature? and i dont want to make you add in a temporary feature just for me hehe. is there a issue for this feature anywhere

kiljacken commented 8 years ago

I do not believe we have the plan written down yet, but it belongs in #675. I'll go write up my ideas for the api.

felixangell commented 8 years ago

I'm interested to see how we will approach this too.