NativeString.hx 328 B

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