ConstCharStar.hx 408 B

12345678910111213141516
  1. package cpp;
  2. abstract ConstCharStar( RawConstPointer<Char> ) to(RawConstPointer<Char>)
  3. {
  4. inline function new(s:String) this = untyped s.__s;
  5. @:from
  6. static public inline function fromString(s:String) return new ConstCharStar(s);
  7. @:to @:extern
  8. public inline function toString():String return new String(untyped this);
  9. @:to @:extern
  10. public inline function toPointer() return this;
  11. }