StringTools.hx 577 B

1234567891011121314151617
  1. package lua;
  2. /**
  3. These are all externs for the base Lua "string" class. Note that all
  4. relevant indexes are "1" based.
  5. **/
  6. @:native("_G.string")
  7. extern class StringTools {
  8. public static function len(str:String) : Int;
  9. public static function sub(str:String, start:Int, end:Int) : String;
  10. public static function charCodeAt(str:String, index:Int) : Int;
  11. public static function find(str:String, target:String, start:Int, end :Int, plain:Bool) : Int;
  12. public static function byte(str:String, index:Int) : Int;
  13. @:overload(function(pos:Int):String{})
  14. //TODO: The rest
  15. }