NativeString.hx 341 B

12345678910111213
  1. package cpp;
  2. extern class NativeString {
  3. public static inline function c_str( inString:String ) : ConstPointer<Char> {
  4. var result:ConstPointer<Char> = untyped inString.__s;
  5. return result;
  6. }
  7. public static inline function fromPointer(inPtr:ConstPointer<Char> ) : String {
  8. return untyped __global__.String(inPtr.ptr);
  9. }
  10. }