string.gen.go 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596
  1. // Copyright © 2019 - 2020 Oscar Campos <oscar.campos@thepimpam.com>
  2. // Copyright © 2017 - William Edwards
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. package gdnative
  16. // ==================================================================
  17. // This file was autogenerated by PimPam GDNative-Go binding tools
  18. // Please do not modify this file, any change will be lost
  19. // ==================================================================
  20. /*
  21. #include "gdnative.gen.h"
  22. #include <gdnative/string.h>
  23. // Include all headers for now. TODO: Look up all the required
  24. // headers we need to import based on the method arguments and return types.
  25. #include <gdnative/aabb.h>
  26. #include <gdnative/array.h>
  27. #include <gdnative/basis.h>
  28. #include <gdnative/color.h>
  29. #include <gdnative/dictionary.h>
  30. #include <gdnative/gdnative.h>
  31. #include <gdnative/node_path.h>
  32. #include <gdnative/plane.h>
  33. #include <gdnative/pool_arrays.h>
  34. #include <gdnative/quat.h>
  35. #include <gdnative/rect2.h>
  36. #include <gdnative/rid.h>
  37. #include <gdnative/string.h>
  38. #include <gdnative/string_name.h>
  39. #include <gdnative/transform.h>
  40. #include <gdnative/transform2d.h>
  41. #include <gdnative/variant.h>
  42. #include <gdnative/vector2.h>
  43. #include <gdnative/vector3.h>
  44. #include <gdnative_api_struct.gen.h>
  45. */
  46. import "C"
  47. import "unsafe"
  48. // NewEmptyString will return a pointer to an empty
  49. // initialized String. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyString() Pointer {
  52. var obj C.godot_string
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromString will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromString(obj String) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewStringFromPointer will return a String from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewStringFromPointer(ptr Pointer) String {
  63. base := (*C.godot_string)(ptr.getBase())
  64. utfStr := C.go_godot_string_utf8(GDNative.api, base)
  65. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  66. goStr := C.GoString(char)
  67. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  68. return String(goStr)
  69. }
  70. type String string
  71. func (s String) getBase() *C.godot_string {
  72. return stringAsGodotString(string(s))
  73. }
  74. // OperatorIndex godot_string_operator_index [[godot_string * p_self] [const godot_int p_idx]] const wchar_t *
  75. func (gdt *String) OperatorIndex(idx Int) WcharT {
  76. arg0 := gdt.getBase()
  77. arg1 := idx.getBase()
  78. ret := C.go_godot_string_operator_index(GDNative.api, arg0, arg1)
  79. return newWcharT(ret)
  80. }
  81. // OperatorIndexConst godot_string_operator_index_const [[const godot_string * p_self] [const godot_int p_idx]] wchar_t
  82. func (gdt *String) OperatorIndexConst(idx Int) WcharT {
  83. arg0 := gdt.getBase()
  84. arg1 := idx.getBase()
  85. ret := C.go_godot_string_operator_index_const(GDNative.api, arg0, arg1)
  86. return newWcharT(&ret)
  87. }
  88. // WideStr godot_string_wide_str [[const godot_string * p_self]] const wchar_t *
  89. func (gdt *String) WideStr() WcharT {
  90. arg0 := gdt.getBase()
  91. ret := C.go_godot_string_wide_str(GDNative.api, arg0)
  92. return newWcharT(ret)
  93. }
  94. // OperatorEqual godot_string_operator_equal [[const godot_string * p_self] [const godot_string * p_b]] godot_bool
  95. func (gdt *String) OperatorEqual(b String) Bool {
  96. arg0 := gdt.getBase()
  97. arg1 := b.getBase()
  98. ret := C.go_godot_string_operator_equal(GDNative.api, arg0, arg1)
  99. return Bool(ret)
  100. }
  101. // OperatorLess godot_string_operator_less [[const godot_string * p_self] [const godot_string * p_b]] godot_bool
  102. func (gdt *String) OperatorLess(b String) Bool {
  103. arg0 := gdt.getBase()
  104. arg1 := b.getBase()
  105. ret := C.go_godot_string_operator_less(GDNative.api, arg0, arg1)
  106. return Bool(ret)
  107. }
  108. // OperatorPlus godot_string_operator_plus [[const godot_string * p_self] [const godot_string * p_b]] godot_string
  109. func (gdt *String) OperatorPlus(b String) String {
  110. arg0 := gdt.getBase()
  111. arg1 := b.getBase()
  112. ret := C.go_godot_string_operator_plus(GDNative.api, arg0, arg1)
  113. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  114. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  115. goStr := C.GoString(char)
  116. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  117. return String(goStr)
  118. }
  119. // Length godot_string_length [[const godot_string * p_self]] godot_int
  120. func (gdt *String) Length() Int {
  121. arg0 := gdt.getBase()
  122. ret := C.go_godot_string_length(GDNative.api, arg0)
  123. return Int(ret)
  124. }
  125. // CasecmpTo godot_string_casecmp_to [[const godot_string * p_self] [const godot_string * p_str]] signed char
  126. func (gdt *String) CasecmpTo(str String) SignedChar {
  127. arg0 := gdt.getBase()
  128. arg1 := str.getBase()
  129. ret := C.go_godot_string_casecmp_to(GDNative.api, arg0, arg1)
  130. return SignedChar(ret)
  131. }
  132. // NocasecmpTo godot_string_nocasecmp_to [[const godot_string * p_self] [const godot_string * p_str]] signed char
  133. func (gdt *String) NocasecmpTo(str String) SignedChar {
  134. arg0 := gdt.getBase()
  135. arg1 := str.getBase()
  136. ret := C.go_godot_string_nocasecmp_to(GDNative.api, arg0, arg1)
  137. return SignedChar(ret)
  138. }
  139. // NaturalnocasecmpTo godot_string_naturalnocasecmp_to [[const godot_string * p_self] [const godot_string * p_str]] signed char
  140. func (gdt *String) NaturalnocasecmpTo(str String) SignedChar {
  141. arg0 := gdt.getBase()
  142. arg1 := str.getBase()
  143. ret := C.go_godot_string_naturalnocasecmp_to(GDNative.api, arg0, arg1)
  144. return SignedChar(ret)
  145. }
  146. // BeginsWith godot_string_begins_with [[const godot_string * p_self] [const godot_string * p_string]] godot_bool
  147. func (gdt *String) BeginsWith(str String) Bool {
  148. arg0 := gdt.getBase()
  149. arg1 := str.getBase()
  150. ret := C.go_godot_string_begins_with(GDNative.api, arg0, arg1)
  151. return Bool(ret)
  152. }
  153. // BeginsWithCharArray godot_string_begins_with_char_array [[const godot_string * p_self] [const char * p_char_array]] godot_bool
  154. func (gdt *String) BeginsWithCharArray(charArray Char) Bool {
  155. arg0 := gdt.getBase()
  156. arg1 := charArray.getBase()
  157. ret := C.go_godot_string_begins_with_char_array(GDNative.api, arg0, arg1)
  158. return Bool(ret)
  159. }
  160. // Bigrams godot_string_bigrams [[const godot_string * p_self]] godot_array
  161. func (gdt *String) Bigrams() Array {
  162. arg0 := gdt.getBase()
  163. ret := C.go_godot_string_bigrams(GDNative.api, arg0)
  164. return Array{base: &ret}
  165. }
  166. // EndsWith godot_string_ends_with [[const godot_string * p_self] [const godot_string * p_string]] godot_bool
  167. func (gdt *String) EndsWith(str String) Bool {
  168. arg0 := gdt.getBase()
  169. arg1 := str.getBase()
  170. ret := C.go_godot_string_ends_with(GDNative.api, arg0, arg1)
  171. return Bool(ret)
  172. }
  173. // Find godot_string_find [[const godot_string * p_self] [godot_string p_what]] godot_int
  174. func (gdt *String) Find(what String) Int {
  175. arg0 := gdt.getBase()
  176. arg1 := what.getBase()
  177. ret := C.go_godot_string_find(GDNative.api, arg0, *arg1)
  178. return Int(ret)
  179. }
  180. // FindFrom godot_string_find_from [[const godot_string * p_self] [godot_string p_what] [godot_int p_from]] godot_int
  181. func (gdt *String) FindFrom(what String, from Int) Int {
  182. arg0 := gdt.getBase()
  183. arg1 := what.getBase()
  184. arg2 := from.getBase()
  185. ret := C.go_godot_string_find_from(GDNative.api, arg0, *arg1, arg2)
  186. return Int(ret)
  187. }
  188. // Findmk godot_string_findmk [[const godot_string * p_self] [const godot_array * p_keys]] godot_int
  189. func (gdt *String) Findmk(keys Array) Int {
  190. arg0 := gdt.getBase()
  191. arg1 := keys.getBase()
  192. ret := C.go_godot_string_findmk(GDNative.api, arg0, arg1)
  193. return Int(ret)
  194. }
  195. // FindmkFrom godot_string_findmk_from [[const godot_string * p_self] [const godot_array * p_keys] [godot_int p_from]] godot_int
  196. func (gdt *String) FindmkFrom(keys Array, from Int) Int {
  197. arg0 := gdt.getBase()
  198. arg1 := keys.getBase()
  199. arg2 := from.getBase()
  200. ret := C.go_godot_string_findmk_from(GDNative.api, arg0, arg1, arg2)
  201. return Int(ret)
  202. }
  203. // FindmkFromInPlace godot_string_findmk_from_in_place [[const godot_string * p_self] [const godot_array * p_keys] [godot_int p_from] [godot_int * r_key]] godot_int
  204. func (gdt *String) FindmkFromInPlace(keys Array, from Int, key Int) Int {
  205. arg0 := gdt.getBase()
  206. arg1 := keys.getBase()
  207. arg2 := from.getBase()
  208. arg3 := key.getBase()
  209. ret := C.go_godot_string_findmk_from_in_place(GDNative.api, arg0, arg1, arg2, &arg3)
  210. return Int(ret)
  211. }
  212. // Findn godot_string_findn [[const godot_string * p_self] [godot_string p_what]] godot_int
  213. func (gdt *String) Findn(what String) Int {
  214. arg0 := gdt.getBase()
  215. arg1 := what.getBase()
  216. ret := C.go_godot_string_findn(GDNative.api, arg0, *arg1)
  217. return Int(ret)
  218. }
  219. // FindnFrom godot_string_findn_from [[const godot_string * p_self] [godot_string p_what] [godot_int p_from]] godot_int
  220. func (gdt *String) FindnFrom(what String, from Int) Int {
  221. arg0 := gdt.getBase()
  222. arg1 := what.getBase()
  223. arg2 := from.getBase()
  224. ret := C.go_godot_string_findn_from(GDNative.api, arg0, *arg1, arg2)
  225. return Int(ret)
  226. }
  227. // FindLast godot_string_find_last [[const godot_string * p_self] [godot_string p_what]] godot_int
  228. func (gdt *String) FindLast(what String) Int {
  229. arg0 := gdt.getBase()
  230. arg1 := what.getBase()
  231. ret := C.go_godot_string_find_last(GDNative.api, arg0, *arg1)
  232. return Int(ret)
  233. }
  234. // Format godot_string_format [[const godot_string * p_self] [const godot_variant * p_values]] godot_string
  235. func (gdt *String) Format(values Variant) String {
  236. arg0 := gdt.getBase()
  237. arg1 := values.getBase()
  238. ret := C.go_godot_string_format(GDNative.api, arg0, arg1)
  239. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  240. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  241. goStr := C.GoString(char)
  242. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  243. return String(goStr)
  244. }
  245. // FormatWithCustomPlaceholder godot_string_format_with_custom_placeholder [[const godot_string * p_self] [const godot_variant * p_values] [const char * p_placeholder]] godot_string
  246. func (gdt *String) FormatWithCustomPlaceholder(values Variant, placeholder Char) String {
  247. arg0 := gdt.getBase()
  248. arg1 := values.getBase()
  249. arg2 := placeholder.getBase()
  250. ret := C.go_godot_string_format_with_custom_placeholder(GDNative.api, arg0, arg1, arg2)
  251. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  252. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  253. goStr := C.GoString(char)
  254. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  255. return String(goStr)
  256. }
  257. // HexToInt godot_string_hex_to_int [[const godot_string * p_self]] godot_int
  258. func (gdt *String) HexToInt() Int {
  259. arg0 := gdt.getBase()
  260. ret := C.go_godot_string_hex_to_int(GDNative.api, arg0)
  261. return Int(ret)
  262. }
  263. // HexToIntWithoutPrefix godot_string_hex_to_int_without_prefix [[const godot_string * p_self]] godot_int
  264. func (gdt *String) HexToIntWithoutPrefix() Int {
  265. arg0 := gdt.getBase()
  266. ret := C.go_godot_string_hex_to_int_without_prefix(GDNative.api, arg0)
  267. return Int(ret)
  268. }
  269. // Insert godot_string_insert [[const godot_string * p_self] [godot_int p_at_pos] [godot_string p_string]] godot_string
  270. func (gdt *String) Insert(atPos Int, str String) String {
  271. arg0 := gdt.getBase()
  272. arg1 := atPos.getBase()
  273. arg2 := str.getBase()
  274. ret := C.go_godot_string_insert(GDNative.api, arg0, arg1, *arg2)
  275. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  276. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  277. goStr := C.GoString(char)
  278. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  279. return String(goStr)
  280. }
  281. // IsNumeric godot_string_is_numeric [[const godot_string * p_self]] godot_bool
  282. func (gdt *String) IsNumeric() Bool {
  283. arg0 := gdt.getBase()
  284. ret := C.go_godot_string_is_numeric(GDNative.api, arg0)
  285. return Bool(ret)
  286. }
  287. // IsSubsequenceOf godot_string_is_subsequence_of [[const godot_string * p_self] [const godot_string * p_string]] godot_bool
  288. func (gdt *String) IsSubsequenceOf(str String) Bool {
  289. arg0 := gdt.getBase()
  290. arg1 := str.getBase()
  291. ret := C.go_godot_string_is_subsequence_of(GDNative.api, arg0, arg1)
  292. return Bool(ret)
  293. }
  294. // IsSubsequenceOfi godot_string_is_subsequence_ofi [[const godot_string * p_self] [const godot_string * p_string]] godot_bool
  295. func (gdt *String) IsSubsequenceOfi(str String) Bool {
  296. arg0 := gdt.getBase()
  297. arg1 := str.getBase()
  298. ret := C.go_godot_string_is_subsequence_ofi(GDNative.api, arg0, arg1)
  299. return Bool(ret)
  300. }
  301. // Lpad godot_string_lpad [[const godot_string * p_self] [godot_int p_min_length]] godot_string
  302. func (gdt *String) Lpad(minLength Int) String {
  303. arg0 := gdt.getBase()
  304. arg1 := minLength.getBase()
  305. ret := C.go_godot_string_lpad(GDNative.api, arg0, arg1)
  306. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  307. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  308. goStr := C.GoString(char)
  309. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  310. return String(goStr)
  311. }
  312. // LpadWithCustomCharacter godot_string_lpad_with_custom_character [[const godot_string * p_self] [godot_int p_min_length] [const godot_string * p_character]] godot_string
  313. func (gdt *String) LpadWithCustomCharacter(minLength Int, character String) String {
  314. arg0 := gdt.getBase()
  315. arg1 := minLength.getBase()
  316. arg2 := character.getBase()
  317. ret := C.go_godot_string_lpad_with_custom_character(GDNative.api, arg0, arg1, arg2)
  318. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  319. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  320. goStr := C.GoString(char)
  321. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  322. return String(goStr)
  323. }
  324. // Match godot_string_match [[const godot_string * p_self] [const godot_string * p_wildcard]] godot_bool
  325. func (gdt *String) Match(wildcard String) Bool {
  326. arg0 := gdt.getBase()
  327. arg1 := wildcard.getBase()
  328. ret := C.go_godot_string_match(GDNative.api, arg0, arg1)
  329. return Bool(ret)
  330. }
  331. // Matchn godot_string_matchn [[const godot_string * p_self] [const godot_string * p_wildcard]] godot_bool
  332. func (gdt *String) Matchn(wildcard String) Bool {
  333. arg0 := gdt.getBase()
  334. arg1 := wildcard.getBase()
  335. ret := C.go_godot_string_matchn(GDNative.api, arg0, arg1)
  336. return Bool(ret)
  337. }
  338. // PadDecimals godot_string_pad_decimals [[const godot_string * p_self] [godot_int p_digits]] godot_string
  339. func (gdt *String) PadDecimals(digits Int) String {
  340. arg0 := gdt.getBase()
  341. arg1 := digits.getBase()
  342. ret := C.go_godot_string_pad_decimals(GDNative.api, arg0, arg1)
  343. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  344. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  345. goStr := C.GoString(char)
  346. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  347. return String(goStr)
  348. }
  349. // PadZeros godot_string_pad_zeros [[const godot_string * p_self] [godot_int p_digits]] godot_string
  350. func (gdt *String) PadZeros(digits Int) String {
  351. arg0 := gdt.getBase()
  352. arg1 := digits.getBase()
  353. ret := C.go_godot_string_pad_zeros(GDNative.api, arg0, arg1)
  354. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  355. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  356. goStr := C.GoString(char)
  357. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  358. return String(goStr)
  359. }
  360. // ReplaceFirst godot_string_replace_first [[const godot_string * p_self] [godot_string p_key] [godot_string p_with]] godot_string
  361. func (gdt *String) ReplaceFirst(key String, with String) String {
  362. arg0 := gdt.getBase()
  363. arg1 := key.getBase()
  364. arg2 := with.getBase()
  365. ret := C.go_godot_string_replace_first(GDNative.api, arg0, *arg1, *arg2)
  366. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  367. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  368. goStr := C.GoString(char)
  369. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  370. return String(goStr)
  371. }
  372. // Replace godot_string_replace [[const godot_string * p_self] [godot_string p_key] [godot_string p_with]] godot_string
  373. func (gdt *String) Replace(key String, with String) String {
  374. arg0 := gdt.getBase()
  375. arg1 := key.getBase()
  376. arg2 := with.getBase()
  377. ret := C.go_godot_string_replace(GDNative.api, arg0, *arg1, *arg2)
  378. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  379. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  380. goStr := C.GoString(char)
  381. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  382. return String(goStr)
  383. }
  384. // Replacen godot_string_replacen [[const godot_string * p_self] [godot_string p_key] [godot_string p_with]] godot_string
  385. func (gdt *String) Replacen(key String, with String) String {
  386. arg0 := gdt.getBase()
  387. arg1 := key.getBase()
  388. arg2 := with.getBase()
  389. ret := C.go_godot_string_replacen(GDNative.api, arg0, *arg1, *arg2)
  390. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  391. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  392. goStr := C.GoString(char)
  393. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  394. return String(goStr)
  395. }
  396. // Rfind godot_string_rfind [[const godot_string * p_self] [godot_string p_what]] godot_int
  397. func (gdt *String) Rfind(what String) Int {
  398. arg0 := gdt.getBase()
  399. arg1 := what.getBase()
  400. ret := C.go_godot_string_rfind(GDNative.api, arg0, *arg1)
  401. return Int(ret)
  402. }
  403. // Rfindn godot_string_rfindn [[const godot_string * p_self] [godot_string p_what]] godot_int
  404. func (gdt *String) Rfindn(what String) Int {
  405. arg0 := gdt.getBase()
  406. arg1 := what.getBase()
  407. ret := C.go_godot_string_rfindn(GDNative.api, arg0, *arg1)
  408. return Int(ret)
  409. }
  410. // RfindFrom godot_string_rfind_from [[const godot_string * p_self] [godot_string p_what] [godot_int p_from]] godot_int
  411. func (gdt *String) RfindFrom(what String, from Int) Int {
  412. arg0 := gdt.getBase()
  413. arg1 := what.getBase()
  414. arg2 := from.getBase()
  415. ret := C.go_godot_string_rfind_from(GDNative.api, arg0, *arg1, arg2)
  416. return Int(ret)
  417. }
  418. // RfindnFrom godot_string_rfindn_from [[const godot_string * p_self] [godot_string p_what] [godot_int p_from]] godot_int
  419. func (gdt *String) RfindnFrom(what String, from Int) Int {
  420. arg0 := gdt.getBase()
  421. arg1 := what.getBase()
  422. arg2 := from.getBase()
  423. ret := C.go_godot_string_rfindn_from(GDNative.api, arg0, *arg1, arg2)
  424. return Int(ret)
  425. }
  426. // Rpad godot_string_rpad [[const godot_string * p_self] [godot_int p_min_length]] godot_string
  427. func (gdt *String) Rpad(minLength Int) String {
  428. arg0 := gdt.getBase()
  429. arg1 := minLength.getBase()
  430. ret := C.go_godot_string_rpad(GDNative.api, arg0, arg1)
  431. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  432. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  433. goStr := C.GoString(char)
  434. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  435. return String(goStr)
  436. }
  437. // RpadWithCustomCharacter godot_string_rpad_with_custom_character [[const godot_string * p_self] [godot_int p_min_length] [const godot_string * p_character]] godot_string
  438. func (gdt *String) RpadWithCustomCharacter(minLength Int, character String) String {
  439. arg0 := gdt.getBase()
  440. arg1 := minLength.getBase()
  441. arg2 := character.getBase()
  442. ret := C.go_godot_string_rpad_with_custom_character(GDNative.api, arg0, arg1, arg2)
  443. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  444. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  445. goStr := C.GoString(char)
  446. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  447. return String(goStr)
  448. }
  449. // Similarity godot_string_similarity [[const godot_string * p_self] [const godot_string * p_string]] godot_real
  450. func (gdt *String) Similarity(str String) Real {
  451. arg0 := gdt.getBase()
  452. arg1 := str.getBase()
  453. ret := C.go_godot_string_similarity(GDNative.api, arg0, arg1)
  454. return Real(ret)
  455. }
  456. // Sprintf godot_string_sprintf [[const godot_string * p_self] [const godot_array * p_values] [godot_bool * p_error]] godot_string
  457. func (gdt *String) Sprintf(values Array, error Bool) String {
  458. arg0 := gdt.getBase()
  459. arg1 := values.getBase()
  460. arg2 := error.getBase()
  461. ret := C.go_godot_string_sprintf(GDNative.api, arg0, arg1, &arg2)
  462. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  463. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  464. goStr := C.GoString(char)
  465. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  466. return String(goStr)
  467. }
  468. // Substr godot_string_substr [[const godot_string * p_self] [godot_int p_from] [godot_int p_chars]] godot_string
  469. func (gdt *String) Substr(from Int, chars Int) String {
  470. arg0 := gdt.getBase()
  471. arg1 := from.getBase()
  472. arg2 := chars.getBase()
  473. ret := C.go_godot_string_substr(GDNative.api, arg0, arg1, arg2)
  474. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  475. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  476. goStr := C.GoString(char)
  477. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  478. return String(goStr)
  479. }
  480. // ToDouble godot_string_to_double [[const godot_string * p_self]] double
  481. func (gdt *String) ToDouble() Double {
  482. arg0 := gdt.getBase()
  483. ret := C.go_godot_string_to_double(GDNative.api, arg0)
  484. return Double(ret)
  485. }
  486. // ToFloat godot_string_to_float [[const godot_string * p_self]] godot_real
  487. func (gdt *String) ToFloat() Real {
  488. arg0 := gdt.getBase()
  489. ret := C.go_godot_string_to_float(GDNative.api, arg0)
  490. return Real(ret)
  491. }
  492. // ToInt godot_string_to_int [[const godot_string * p_self]] godot_int
  493. func (gdt *String) ToInt() Int {
  494. arg0 := gdt.getBase()
  495. ret := C.go_godot_string_to_int(GDNative.api, arg0)
  496. return Int(ret)
  497. }
  498. // CamelcaseToUnderscore godot_string_camelcase_to_underscore [[const godot_string * p_self]] godot_string
  499. func (gdt *String) CamelcaseToUnderscore() String {
  500. arg0 := gdt.getBase()
  501. ret := C.go_godot_string_camelcase_to_underscore(GDNative.api, arg0)
  502. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  503. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  504. goStr := C.GoString(char)
  505. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  506. return String(goStr)
  507. }
  508. // CamelcaseToUnderscoreLowercased godot_string_camelcase_to_underscore_lowercased [[const godot_string * p_self]] godot_string
  509. func (gdt *String) CamelcaseToUnderscoreLowercased() String {
  510. arg0 := gdt.getBase()
  511. ret := C.go_godot_string_camelcase_to_underscore_lowercased(GDNative.api, arg0)
  512. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  513. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  514. goStr := C.GoString(char)
  515. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  516. return String(goStr)
  517. }
  518. // Capitalize godot_string_capitalize [[const godot_string * p_self]] godot_string
  519. func (gdt *String) Capitalize() String {
  520. arg0 := gdt.getBase()
  521. ret := C.go_godot_string_capitalize(GDNative.api, arg0)
  522. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  523. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  524. goStr := C.GoString(char)
  525. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  526. return String(goStr)
  527. }
  528. // HexToInt64 godot_string_hex_to_int64 [[const godot_string * p_self]] int64_t
  529. func (gdt *String) HexToInt64() Int64T {
  530. arg0 := gdt.getBase()
  531. ret := C.go_godot_string_hex_to_int64(GDNative.api, arg0)
  532. return Int64T(ret)
  533. }
  534. // HexToInt64WithPrefix godot_string_hex_to_int64_with_prefix [[const godot_string * p_self]] int64_t
  535. func (gdt *String) HexToInt64WithPrefix() Int64T {
  536. arg0 := gdt.getBase()
  537. ret := C.go_godot_string_hex_to_int64_with_prefix(GDNative.api, arg0)
  538. return Int64T(ret)
  539. }
  540. // ToInt64 godot_string_to_int64 [[const godot_string * p_self]] int64_t
  541. func (gdt *String) ToInt64() Int64T {
  542. arg0 := gdt.getBase()
  543. ret := C.go_godot_string_to_int64(GDNative.api, arg0)
  544. return Int64T(ret)
  545. }
  546. // GetSliceCount godot_string_get_slice_count [[const godot_string * p_self] [godot_string p_splitter]] godot_int
  547. func (gdt *String) GetSliceCount(splitter String) Int {
  548. arg0 := gdt.getBase()
  549. arg1 := splitter.getBase()
  550. ret := C.go_godot_string_get_slice_count(GDNative.api, arg0, *arg1)
  551. return Int(ret)
  552. }
  553. // GetSlice godot_string_get_slice [[const godot_string * p_self] [godot_string p_splitter] [godot_int p_slice]] godot_string
  554. func (gdt *String) GetSlice(splitter String, slice Int) String {
  555. arg0 := gdt.getBase()
  556. arg1 := splitter.getBase()
  557. arg2 := slice.getBase()
  558. ret := C.go_godot_string_get_slice(GDNative.api, arg0, *arg1, arg2)
  559. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  560. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  561. goStr := C.GoString(char)
  562. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  563. return String(goStr)
  564. }
  565. // GetSlicec godot_string_get_slicec [[const godot_string * p_self] [wchar_t p_splitter] [godot_int p_slice]] godot_string
  566. func (gdt *String) GetSlicec(splitter WcharT, slice Int) String {
  567. arg0 := gdt.getBase()
  568. arg1 := splitter.getBase()
  569. arg2 := slice.getBase()
  570. ret := C.go_godot_string_get_slicec(GDNative.api, arg0, *arg1, arg2)
  571. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  572. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  573. goStr := C.GoString(char)
  574. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  575. return String(goStr)
  576. }
  577. // Split godot_string_split [[const godot_string * p_self] [const godot_string * p_splitter]] godot_array
  578. func (gdt *String) Split(splitter String) Array {
  579. arg0 := gdt.getBase()
  580. arg1 := splitter.getBase()
  581. ret := C.go_godot_string_split(GDNative.api, arg0, arg1)
  582. return Array{base: &ret}
  583. }
  584. // SplitAllowEmpty godot_string_split_allow_empty [[const godot_string * p_self] [const godot_string * p_splitter]] godot_array
  585. func (gdt *String) SplitAllowEmpty(splitter String) Array {
  586. arg0 := gdt.getBase()
  587. arg1 := splitter.getBase()
  588. ret := C.go_godot_string_split_allow_empty(GDNative.api, arg0, arg1)
  589. return Array{base: &ret}
  590. }
  591. // SplitFloats godot_string_split_floats [[const godot_string * p_self] [const godot_string * p_splitter]] godot_array
  592. func (gdt *String) SplitFloats(splitter String) Array {
  593. arg0 := gdt.getBase()
  594. arg1 := splitter.getBase()
  595. ret := C.go_godot_string_split_floats(GDNative.api, arg0, arg1)
  596. return Array{base: &ret}
  597. }
  598. // SplitFloatsAllowsEmpty godot_string_split_floats_allows_empty [[const godot_string * p_self] [const godot_string * p_splitter]] godot_array
  599. func (gdt *String) SplitFloatsAllowsEmpty(splitter String) Array {
  600. arg0 := gdt.getBase()
  601. arg1 := splitter.getBase()
  602. ret := C.go_godot_string_split_floats_allows_empty(GDNative.api, arg0, arg1)
  603. return Array{base: &ret}
  604. }
  605. // SplitFloatsMk godot_string_split_floats_mk [[const godot_string * p_self] [const godot_array * p_splitters]] godot_array
  606. func (gdt *String) SplitFloatsMk(splitters Array) Array {
  607. arg0 := gdt.getBase()
  608. arg1 := splitters.getBase()
  609. ret := C.go_godot_string_split_floats_mk(GDNative.api, arg0, arg1)
  610. return Array{base: &ret}
  611. }
  612. // SplitFloatsMkAllowsEmpty godot_string_split_floats_mk_allows_empty [[const godot_string * p_self] [const godot_array * p_splitters]] godot_array
  613. func (gdt *String) SplitFloatsMkAllowsEmpty(splitters Array) Array {
  614. arg0 := gdt.getBase()
  615. arg1 := splitters.getBase()
  616. ret := C.go_godot_string_split_floats_mk_allows_empty(GDNative.api, arg0, arg1)
  617. return Array{base: &ret}
  618. }
  619. // SplitInts godot_string_split_ints [[const godot_string * p_self] [const godot_string * p_splitter]] godot_array
  620. func (gdt *String) SplitInts(splitter String) Array {
  621. arg0 := gdt.getBase()
  622. arg1 := splitter.getBase()
  623. ret := C.go_godot_string_split_ints(GDNative.api, arg0, arg1)
  624. return Array{base: &ret}
  625. }
  626. // SplitIntsAllowsEmpty godot_string_split_ints_allows_empty [[const godot_string * p_self] [const godot_string * p_splitter]] godot_array
  627. func (gdt *String) SplitIntsAllowsEmpty(splitter String) Array {
  628. arg0 := gdt.getBase()
  629. arg1 := splitter.getBase()
  630. ret := C.go_godot_string_split_ints_allows_empty(GDNative.api, arg0, arg1)
  631. return Array{base: &ret}
  632. }
  633. // SplitIntsMk godot_string_split_ints_mk [[const godot_string * p_self] [const godot_array * p_splitters]] godot_array
  634. func (gdt *String) SplitIntsMk(splitters Array) Array {
  635. arg0 := gdt.getBase()
  636. arg1 := splitters.getBase()
  637. ret := C.go_godot_string_split_ints_mk(GDNative.api, arg0, arg1)
  638. return Array{base: &ret}
  639. }
  640. // SplitIntsMkAllowsEmpty godot_string_split_ints_mk_allows_empty [[const godot_string * p_self] [const godot_array * p_splitters]] godot_array
  641. func (gdt *String) SplitIntsMkAllowsEmpty(splitters Array) Array {
  642. arg0 := gdt.getBase()
  643. arg1 := splitters.getBase()
  644. ret := C.go_godot_string_split_ints_mk_allows_empty(GDNative.api, arg0, arg1)
  645. return Array{base: &ret}
  646. }
  647. // SplitSpaces godot_string_split_spaces [[const godot_string * p_self]] godot_array
  648. func (gdt *String) SplitSpaces() Array {
  649. arg0 := gdt.getBase()
  650. ret := C.go_godot_string_split_spaces(GDNative.api, arg0)
  651. return Array{base: &ret}
  652. }
  653. // ToLower godot_string_to_lower [[const godot_string * p_self]] godot_string
  654. func (gdt *String) ToLower() String {
  655. arg0 := gdt.getBase()
  656. ret := C.go_godot_string_to_lower(GDNative.api, arg0)
  657. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  658. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  659. goStr := C.GoString(char)
  660. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  661. return String(goStr)
  662. }
  663. // ToUpper godot_string_to_upper [[const godot_string * p_self]] godot_string
  664. func (gdt *String) ToUpper() String {
  665. arg0 := gdt.getBase()
  666. ret := C.go_godot_string_to_upper(GDNative.api, arg0)
  667. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  668. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  669. goStr := C.GoString(char)
  670. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  671. return String(goStr)
  672. }
  673. // GetBasename godot_string_get_basename [[const godot_string * p_self]] godot_string
  674. func (gdt *String) GetBasename() String {
  675. arg0 := gdt.getBase()
  676. ret := C.go_godot_string_get_basename(GDNative.api, arg0)
  677. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  678. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  679. goStr := C.GoString(char)
  680. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  681. return String(goStr)
  682. }
  683. // GetExtension godot_string_get_extension [[const godot_string * p_self]] godot_string
  684. func (gdt *String) GetExtension() String {
  685. arg0 := gdt.getBase()
  686. ret := C.go_godot_string_get_extension(GDNative.api, arg0)
  687. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  688. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  689. goStr := C.GoString(char)
  690. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  691. return String(goStr)
  692. }
  693. // Left godot_string_left [[const godot_string * p_self] [godot_int p_pos]] godot_string
  694. func (gdt *String) Left(pos Int) String {
  695. arg0 := gdt.getBase()
  696. arg1 := pos.getBase()
  697. ret := C.go_godot_string_left(GDNative.api, arg0, arg1)
  698. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  699. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  700. goStr := C.GoString(char)
  701. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  702. return String(goStr)
  703. }
  704. // OrdAt godot_string_ord_at [[const godot_string * p_self] [godot_int p_idx]] wchar_t
  705. func (gdt *String) OrdAt(idx Int) WcharT {
  706. arg0 := gdt.getBase()
  707. arg1 := idx.getBase()
  708. ret := C.go_godot_string_ord_at(GDNative.api, arg0, arg1)
  709. return newWcharT(&ret)
  710. }
  711. // PlusFile godot_string_plus_file [[const godot_string * p_self] [const godot_string * p_file]] godot_string
  712. func (gdt *String) PlusFile(file String) String {
  713. arg0 := gdt.getBase()
  714. arg1 := file.getBase()
  715. ret := C.go_godot_string_plus_file(GDNative.api, arg0, arg1)
  716. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  717. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  718. goStr := C.GoString(char)
  719. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  720. return String(goStr)
  721. }
  722. // Right godot_string_right [[const godot_string * p_self] [godot_int p_pos]] godot_string
  723. func (gdt *String) Right(pos Int) String {
  724. arg0 := gdt.getBase()
  725. arg1 := pos.getBase()
  726. ret := C.go_godot_string_right(GDNative.api, arg0, arg1)
  727. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  728. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  729. goStr := C.GoString(char)
  730. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  731. return String(goStr)
  732. }
  733. // StripEdges godot_string_strip_edges [[const godot_string * p_self] [godot_bool p_left] [godot_bool p_right]] godot_string
  734. func (gdt *String) StripEdges(left Bool, right Bool) String {
  735. arg0 := gdt.getBase()
  736. arg1 := left.getBase()
  737. arg2 := right.getBase()
  738. ret := C.go_godot_string_strip_edges(GDNative.api, arg0, arg1, arg2)
  739. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  740. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  741. goStr := C.GoString(char)
  742. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  743. return String(goStr)
  744. }
  745. // StripEscapes godot_string_strip_escapes [[const godot_string * p_self]] godot_string
  746. func (gdt *String) StripEscapes() String {
  747. arg0 := gdt.getBase()
  748. ret := C.go_godot_string_strip_escapes(GDNative.api, arg0)
  749. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  750. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  751. goStr := C.GoString(char)
  752. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  753. return String(goStr)
  754. }
  755. // Erase godot_string_erase [[godot_string * p_self] [godot_int p_pos] [godot_int p_chars]] void
  756. func (gdt *String) Erase(pos Int, chars Int) {
  757. arg0 := gdt.getBase()
  758. arg1 := pos.getBase()
  759. arg2 := chars.getBase()
  760. C.go_godot_string_erase(GDNative.api, arg0, arg1, arg2)
  761. }
  762. // Ascii godot_string_ascii [[const godot_string * p_self]] godot_char_string
  763. func (gdt *String) Ascii() CharString {
  764. arg0 := gdt.getBase()
  765. ret := C.go_godot_string_ascii(GDNative.api, arg0)
  766. return CharString{base: &ret}
  767. }
  768. // AsciiExtended godot_string_ascii_extended [[const godot_string * p_self]] godot_char_string
  769. func (gdt *String) AsciiExtended() CharString {
  770. arg0 := gdt.getBase()
  771. ret := C.go_godot_string_ascii_extended(GDNative.api, arg0)
  772. return CharString{base: &ret}
  773. }
  774. // Utf8 godot_string_utf8 [[const godot_string * p_self]] godot_char_string
  775. func (gdt *String) Utf8() CharString {
  776. arg0 := gdt.getBase()
  777. ret := C.go_godot_string_utf8(GDNative.api, arg0)
  778. return CharString{base: &ret}
  779. }
  780. // ParseUtf8 godot_string_parse_utf8 [[godot_string * p_self] [const char * p_utf8]] godot_bool
  781. func (gdt *String) ParseUtf8(utf8 Char) Bool {
  782. arg0 := gdt.getBase()
  783. arg1 := utf8.getBase()
  784. ret := C.go_godot_string_parse_utf8(GDNative.api, arg0, arg1)
  785. return Bool(ret)
  786. }
  787. // ParseUtf8WithLen godot_string_parse_utf8_with_len [[godot_string * p_self] [const char * p_utf8] [godot_int p_len]] godot_bool
  788. func (gdt *String) ParseUtf8WithLen(utf8 Char, len Int) Bool {
  789. arg0 := gdt.getBase()
  790. arg1 := utf8.getBase()
  791. arg2 := len.getBase()
  792. ret := C.go_godot_string_parse_utf8_with_len(GDNative.api, arg0, arg1, arg2)
  793. return Bool(ret)
  794. }
  795. // Hash godot_string_hash [[const godot_string * p_self]] uint32_t
  796. func (gdt *String) Hash() Uint32T {
  797. arg0 := gdt.getBase()
  798. ret := C.go_godot_string_hash(GDNative.api, arg0)
  799. return Uint32T(ret)
  800. }
  801. // Hash64 godot_string_hash64 [[const godot_string * p_self]] uint64_t
  802. func (gdt *String) Hash64() Uint64T {
  803. arg0 := gdt.getBase()
  804. ret := C.go_godot_string_hash64(GDNative.api, arg0)
  805. return Uint64T(ret)
  806. }
  807. // Md5Buffer godot_string_md5_buffer [[const godot_string * p_self]] godot_pool_byte_array
  808. func (gdt *String) Md5Buffer() PoolByteArray {
  809. arg0 := gdt.getBase()
  810. ret := C.go_godot_string_md5_buffer(GDNative.api, arg0)
  811. return PoolByteArray{base: &ret}
  812. }
  813. // Md5Text godot_string_md5_text [[const godot_string * p_self]] godot_string
  814. func (gdt *String) Md5Text() String {
  815. arg0 := gdt.getBase()
  816. ret := C.go_godot_string_md5_text(GDNative.api, arg0)
  817. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  818. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  819. goStr := C.GoString(char)
  820. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  821. return String(goStr)
  822. }
  823. // Sha256Buffer godot_string_sha256_buffer [[const godot_string * p_self]] godot_pool_byte_array
  824. func (gdt *String) Sha256Buffer() PoolByteArray {
  825. arg0 := gdt.getBase()
  826. ret := C.go_godot_string_sha256_buffer(GDNative.api, arg0)
  827. return PoolByteArray{base: &ret}
  828. }
  829. // Sha256Text godot_string_sha256_text [[const godot_string * p_self]] godot_string
  830. func (gdt *String) Sha256Text() String {
  831. arg0 := gdt.getBase()
  832. ret := C.go_godot_string_sha256_text(GDNative.api, arg0)
  833. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  834. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  835. goStr := C.GoString(char)
  836. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  837. return String(goStr)
  838. }
  839. // Empty godot_string_empty [[const godot_string * p_self]] godot_bool
  840. func (gdt *String) Empty() Bool {
  841. arg0 := gdt.getBase()
  842. ret := C.go_godot_string_empty(GDNative.api, arg0)
  843. return Bool(ret)
  844. }
  845. // GetBaseDir godot_string_get_base_dir [[const godot_string * p_self]] godot_string
  846. func (gdt *String) GetBaseDir() String {
  847. arg0 := gdt.getBase()
  848. ret := C.go_godot_string_get_base_dir(GDNative.api, arg0)
  849. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  850. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  851. goStr := C.GoString(char)
  852. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  853. return String(goStr)
  854. }
  855. // GetFile godot_string_get_file [[const godot_string * p_self]] godot_string
  856. func (gdt *String) GetFile() String {
  857. arg0 := gdt.getBase()
  858. ret := C.go_godot_string_get_file(GDNative.api, arg0)
  859. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  860. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  861. goStr := C.GoString(char)
  862. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  863. return String(goStr)
  864. }
  865. // IsAbsPath godot_string_is_abs_path [[const godot_string * p_self]] godot_bool
  866. func (gdt *String) IsAbsPath() Bool {
  867. arg0 := gdt.getBase()
  868. ret := C.go_godot_string_is_abs_path(GDNative.api, arg0)
  869. return Bool(ret)
  870. }
  871. // IsRelPath godot_string_is_rel_path [[const godot_string * p_self]] godot_bool
  872. func (gdt *String) IsRelPath() Bool {
  873. arg0 := gdt.getBase()
  874. ret := C.go_godot_string_is_rel_path(GDNative.api, arg0)
  875. return Bool(ret)
  876. }
  877. // IsResourceFile godot_string_is_resource_file [[const godot_string * p_self]] godot_bool
  878. func (gdt *String) IsResourceFile() Bool {
  879. arg0 := gdt.getBase()
  880. ret := C.go_godot_string_is_resource_file(GDNative.api, arg0)
  881. return Bool(ret)
  882. }
  883. // PathTo godot_string_path_to [[const godot_string * p_self] [const godot_string * p_path]] godot_string
  884. func (gdt *String) PathTo(path String) String {
  885. arg0 := gdt.getBase()
  886. arg1 := path.getBase()
  887. ret := C.go_godot_string_path_to(GDNative.api, arg0, arg1)
  888. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  889. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  890. goStr := C.GoString(char)
  891. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  892. return String(goStr)
  893. }
  894. // PathToFile godot_string_path_to_file [[const godot_string * p_self] [const godot_string * p_path]] godot_string
  895. func (gdt *String) PathToFile(path String) String {
  896. arg0 := gdt.getBase()
  897. arg1 := path.getBase()
  898. ret := C.go_godot_string_path_to_file(GDNative.api, arg0, arg1)
  899. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  900. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  901. goStr := C.GoString(char)
  902. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  903. return String(goStr)
  904. }
  905. // SimplifyPath godot_string_simplify_path [[const godot_string * p_self]] godot_string
  906. func (gdt *String) SimplifyPath() String {
  907. arg0 := gdt.getBase()
  908. ret := C.go_godot_string_simplify_path(GDNative.api, arg0)
  909. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  910. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  911. goStr := C.GoString(char)
  912. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  913. return String(goStr)
  914. }
  915. // CEscape godot_string_c_escape [[const godot_string * p_self]] godot_string
  916. func (gdt *String) CEscape() String {
  917. arg0 := gdt.getBase()
  918. ret := C.go_godot_string_c_escape(GDNative.api, arg0)
  919. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  920. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  921. goStr := C.GoString(char)
  922. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  923. return String(goStr)
  924. }
  925. // CEscapeMultiline godot_string_c_escape_multiline [[const godot_string * p_self]] godot_string
  926. func (gdt *String) CEscapeMultiline() String {
  927. arg0 := gdt.getBase()
  928. ret := C.go_godot_string_c_escape_multiline(GDNative.api, arg0)
  929. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  930. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  931. goStr := C.GoString(char)
  932. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  933. return String(goStr)
  934. }
  935. // CUnescape godot_string_c_unescape [[const godot_string * p_self]] godot_string
  936. func (gdt *String) CUnescape() String {
  937. arg0 := gdt.getBase()
  938. ret := C.go_godot_string_c_unescape(GDNative.api, arg0)
  939. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  940. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  941. goStr := C.GoString(char)
  942. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  943. return String(goStr)
  944. }
  945. // HttpEscape godot_string_http_escape [[const godot_string * p_self]] godot_string
  946. func (gdt *String) HttpEscape() String {
  947. arg0 := gdt.getBase()
  948. ret := C.go_godot_string_http_escape(GDNative.api, arg0)
  949. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  950. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  951. goStr := C.GoString(char)
  952. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  953. return String(goStr)
  954. }
  955. // HttpUnescape godot_string_http_unescape [[const godot_string * p_self]] godot_string
  956. func (gdt *String) HttpUnescape() String {
  957. arg0 := gdt.getBase()
  958. ret := C.go_godot_string_http_unescape(GDNative.api, arg0)
  959. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  960. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  961. goStr := C.GoString(char)
  962. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  963. return String(goStr)
  964. }
  965. // JsonEscape godot_string_json_escape [[const godot_string * p_self]] godot_string
  966. func (gdt *String) JsonEscape() String {
  967. arg0 := gdt.getBase()
  968. ret := C.go_godot_string_json_escape(GDNative.api, arg0)
  969. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  970. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  971. goStr := C.GoString(char)
  972. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  973. return String(goStr)
  974. }
  975. // WordWrap godot_string_word_wrap [[const godot_string * p_self] [godot_int p_chars_per_line]] godot_string
  976. func (gdt *String) WordWrap(charsPerLine Int) String {
  977. arg0 := gdt.getBase()
  978. arg1 := charsPerLine.getBase()
  979. ret := C.go_godot_string_word_wrap(GDNative.api, arg0, arg1)
  980. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  981. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  982. goStr := C.GoString(char)
  983. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  984. return String(goStr)
  985. }
  986. // XmlEscape godot_string_xml_escape [[const godot_string * p_self]] godot_string
  987. func (gdt *String) XmlEscape() String {
  988. arg0 := gdt.getBase()
  989. ret := C.go_godot_string_xml_escape(GDNative.api, arg0)
  990. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  991. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  992. goStr := C.GoString(char)
  993. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  994. return String(goStr)
  995. }
  996. // XmlEscapeWithQuotes godot_string_xml_escape_with_quotes [[const godot_string * p_self]] godot_string
  997. func (gdt *String) XmlEscapeWithQuotes() String {
  998. arg0 := gdt.getBase()
  999. ret := C.go_godot_string_xml_escape_with_quotes(GDNative.api, arg0)
  1000. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  1001. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  1002. goStr := C.GoString(char)
  1003. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  1004. return String(goStr)
  1005. }
  1006. // XmlUnescape godot_string_xml_unescape [[const godot_string * p_self]] godot_string
  1007. func (gdt *String) XmlUnescape() String {
  1008. arg0 := gdt.getBase()
  1009. ret := C.go_godot_string_xml_unescape(GDNative.api, arg0)
  1010. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  1011. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  1012. goStr := C.GoString(char)
  1013. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  1014. return String(goStr)
  1015. }
  1016. // PercentDecode godot_string_percent_decode [[const godot_string * p_self]] godot_string
  1017. func (gdt *String) PercentDecode() String {
  1018. arg0 := gdt.getBase()
  1019. ret := C.go_godot_string_percent_decode(GDNative.api, arg0)
  1020. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  1021. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  1022. goStr := C.GoString(char)
  1023. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  1024. return String(goStr)
  1025. }
  1026. // PercentEncode godot_string_percent_encode [[const godot_string * p_self]] godot_string
  1027. func (gdt *String) PercentEncode() String {
  1028. arg0 := gdt.getBase()
  1029. ret := C.go_godot_string_percent_encode(GDNative.api, arg0)
  1030. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  1031. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  1032. goStr := C.GoString(char)
  1033. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  1034. return String(goStr)
  1035. }
  1036. // IsValidFloat godot_string_is_valid_float [[const godot_string * p_self]] godot_bool
  1037. func (gdt *String) IsValidFloat() Bool {
  1038. arg0 := gdt.getBase()
  1039. ret := C.go_godot_string_is_valid_float(GDNative.api, arg0)
  1040. return Bool(ret)
  1041. }
  1042. // IsValidHexNumber godot_string_is_valid_hex_number [[const godot_string * p_self] [godot_bool p_with_prefix]] godot_bool
  1043. func (gdt *String) IsValidHexNumber(withPrefix Bool) Bool {
  1044. arg0 := gdt.getBase()
  1045. arg1 := withPrefix.getBase()
  1046. ret := C.go_godot_string_is_valid_hex_number(GDNative.api, arg0, arg1)
  1047. return Bool(ret)
  1048. }
  1049. // IsValidHtmlColor godot_string_is_valid_html_color [[const godot_string * p_self]] godot_bool
  1050. func (gdt *String) IsValidHtmlColor() Bool {
  1051. arg0 := gdt.getBase()
  1052. ret := C.go_godot_string_is_valid_html_color(GDNative.api, arg0)
  1053. return Bool(ret)
  1054. }
  1055. // IsValidIdentifier godot_string_is_valid_identifier [[const godot_string * p_self]] godot_bool
  1056. func (gdt *String) IsValidIdentifier() Bool {
  1057. arg0 := gdt.getBase()
  1058. ret := C.go_godot_string_is_valid_identifier(GDNative.api, arg0)
  1059. return Bool(ret)
  1060. }
  1061. // IsValidInteger godot_string_is_valid_integer [[const godot_string * p_self]] godot_bool
  1062. func (gdt *String) IsValidInteger() Bool {
  1063. arg0 := gdt.getBase()
  1064. ret := C.go_godot_string_is_valid_integer(GDNative.api, arg0)
  1065. return Bool(ret)
  1066. }
  1067. // IsValidIpAddress godot_string_is_valid_ip_address [[const godot_string * p_self]] godot_bool
  1068. func (gdt *String) IsValidIpAddress() Bool {
  1069. arg0 := gdt.getBase()
  1070. ret := C.go_godot_string_is_valid_ip_address(GDNative.api, arg0)
  1071. return Bool(ret)
  1072. }
  1073. // Destroy godot_string_destroy [[godot_string * p_self]] void
  1074. func (gdt *String) Destroy() {
  1075. arg0 := gdt.getBase()
  1076. C.go_godot_string_destroy(GDNative.api, arg0)
  1077. }
  1078. // NewEmptyCharString will return a pointer to an empty
  1079. // initialized CharString. This is primarily used in
  1080. // conjunction with MethodBindPtrCall.
  1081. func NewEmptyCharString() Pointer {
  1082. var obj C.godot_char_string
  1083. return Pointer{base: unsafe.Pointer(&obj)}
  1084. }
  1085. // NewPointerFromCharString will return an unsafe pointer to the given
  1086. // object. This is primarily used in conjunction with MethodBindPtrCall.
  1087. func NewPointerFromCharString(obj CharString) Pointer {
  1088. return Pointer{base: unsafe.Pointer(obj.getBase())}
  1089. }
  1090. // NewCharStringFromPointer will return a CharString from the
  1091. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  1092. func NewCharStringFromPointer(ptr Pointer) CharString {
  1093. return CharString{base: (*C.godot_char_string)(ptr.getBase())}
  1094. }
  1095. // CharString data structure wrapper
  1096. type CharString struct {
  1097. base *C.godot_char_string
  1098. }
  1099. // returns the wrapped C base data type for this type
  1100. func (gdt CharString) getBase() *C.godot_char_string {
  1101. return gdt.base
  1102. }