stringbuffer_common.bmx 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ' Copyright (c) 2016-2023 Bruce A Henderson
  2. '
  3. ' Permission is hereby granted, free of charge, to any person obtaining a copy
  4. ' of this software and associated documentation files (the "Software"), to deal
  5. ' in the Software without restriction, including without limitation the rights
  6. ' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. ' copies of the Software, and to permit persons to whom the Software is
  8. ' furnished to do so, subject to the following conditions:
  9. '
  10. ' The above copyright notice and this permission notice shall be included in
  11. ' all copies or substantial portions of the Software.
  12. '
  13. ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. ' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. ' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. ' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. ' THE SOFTWARE.
  20. '
  21. SuperStrict
  22. Import "stringbuffer_glue.c"
  23. ?Not bmxng
  24. Import "stringbuffer_uni_conv.c"
  25. ?
  26. Extern
  27. Function bmx_stringbuffer_new:Byte Ptr(initial:Int)
  28. Function bmx_stringbuffer_free(buffer:Byte Ptr)
  29. Function bmx_stringbuffer_count:Int(buffer:Byte Ptr)
  30. Function bmx_stringbuffer_capacity:Int(buffer:Byte Ptr)
  31. Function bmx_stringbuffer_setlength(buffer:Byte Ptr, length:Int)
  32. Function bmx_stringbuffer_tostring:String(buffer:Byte Ptr)
  33. Function bmx_stringbuffer_append_string(buffer:Byte Ptr, value:String)
  34. Function bmx_stringbuffer_append_char(buffer:Byte Ptr, value:Int)
  35. Function bmx_stringbuffer_remove(buffer:Byte Ptr, startIndex:Int, endIndex:Int)
  36. Function bmx_stringbuffer_insert(buffer:Byte Ptr, offset:Int, value:String)
  37. Function bmx_stringbuffer_reverse(buffer:Byte Ptr)
  38. Function bmx_stringbuffer_substring:String(buffer:Byte Ptr, beginIndex:Int, endIndex:Int)
  39. Function bmx_stringbuffer_append_stringbuffer(buffer:Byte Ptr, buffer2:Byte Ptr)
  40. Function bmx_stringbuffer_startswith:Int(buffer:Byte Ptr, subString:String)
  41. Function bmx_stringbuffer_endswith:Int(buffer:Byte Ptr, subString:String)
  42. Function bmx_stringbuffer_find:Int(buffer:Byte Ptr, subString:String, startIndex:Int)
  43. Function bmx_stringbuffer_findlast:Int(buffer:Byte Ptr, subString:String, startIndex:Int)
  44. Function bmx_stringbuffer_tolower(buffer:Byte Ptr)
  45. Function bmx_stringbuffer_toupper(buffer:Byte Ptr)
  46. Function bmx_stringbuffer_trim(buffer:Byte Ptr)
  47. Function bmx_stringbuffer_replace(buffer:Byte Ptr, subString:String, withString:String)
  48. Function bmx_stringbuffer_join(buffer:Byte Ptr, bits:String[], newBuffer:Byte Ptr)
  49. Function bmx_stringbuffer_split:Byte Ptr(buffer:Byte Ptr, separator:String)
  50. Function bmx_stringbuffer_setcharat(buffer:Byte Ptr, index:Int, char:Int)
  51. Function bmx_stringbuffer_charat:Int(buffer:Byte Ptr, index:Int)
  52. Function bmx_stringbuffer_removecharat(buffer:Byte Ptr, index:Int)
  53. Function bmx_stringbuffer_append_cstring(buffer:Byte Ptr, chars:Byte Ptr)
  54. Function bmx_stringbuffer_append_utf8string(buffer:Byte Ptr, chars:Byte Ptr)
  55. Function bmx_stringbuffer_append_shorts(buffer:Byte Ptr, shorts:Short Ptr, length:Int)
  56. Function bmx_stringbuffer_splitbuffer_length:Int(splitPtr:Byte Ptr)
  57. Function bmx_stringbuffer_splitbuffer_text:String(splitPtr:Byte Ptr, index:Int)
  58. Function bmx_stringbuffer_splitbuffer_free(splitPtr:Byte Ptr)
  59. Function bmx_stringbuffer_splitbuffer_toarray:String[](splitPtr:Byte Ptr)
  60. End Extern