@@ -287,6 +287,69 @@ RLCPPAPI inline unsigned int TextLength(const std::string& text) {
287287 return ::TextLength (text.c_str ());
288288}
289289
290+ /* *
291+ * Get text length, checks for '\0' ending
292+ */
293+ RLAPI inline std::string TextSubtext (const std::string& text, int position, int length) {
294+ return TextSubtext (text.c_str (), position, length);
295+ }
296+
297+ /* *
298+ * Replace text string (WARNING: memory must be freed!)
299+ */
300+ RLAPI inline std::string TextReplace (const std::string& text, const std::string& replace, const std::string& by) {
301+ return TextReplace (text.c_str (), replace.c_str (), by.c_str ());
302+ }
303+
304+ /* *
305+ * Insert text in a position (WARNING: memory must be freed!)
306+ */
307+ RLAPI inline std::string TextInsert (const std::string& text, const std::string& insert, int position) {
308+ return TextInsert (text.c_str (), insert.c_str (), position);
309+ }
310+
311+ /* *
312+ * Append text at specific position and move cursor!
313+ */
314+ RLAPI inline void TextAppend (const std::string& text, const std::string& append, int *position) {
315+ return TextAppend (text.c_str (), append.c_str (), position);
316+ }
317+
318+ /* *
319+ * Find first text occurrence within a string
320+ */
321+ RLAPI inline int TextFindIndex (const std::string& text, const std::string& find) {
322+ return TextFindIndex (text.c_str (), find.c_str ());
323+ }
324+
325+ /* *
326+ * Get upper case version of provided string
327+ */
328+ RLAPI inline std::string TextToUpper (const std::string& text) {
329+ return TextToUpper (text.c_str ());
330+ }
331+
332+ /* *
333+ * Get lower case version of provided string
334+ */
335+ RLAPI inline std::string TextToLower (const std::string& text) {
336+ return TextToLower (text.c_str ());
337+ }
338+
339+ /* *
340+ * Get Pascal case notation version of provided string
341+ */
342+ RLAPI inline std::string TextToPascal (const std::string& text) {
343+ return TextToPascal (text.c_str ());
344+ }
345+
346+ /* *
347+ * Get integer value from text (negative values not supported)
348+ */
349+ RLAPI inline int TextToInteger (const std::string& text) {
350+ return TextToInteger (text.c_str ());
351+ }
352+
290353} // namespace raylib
291354
292355#endif // RAYLIB_CPP_INCLUDE_FUNCTIONS_HPP_
0 commit comments