summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/raylib.h4
-rw-r--r--src/text.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/raylib.h b/src/raylib.h
index c3be9d1e..d28dffdb 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -1186,8 +1186,8 @@ RLAPI unsigned int TextLength(const char *text);
RLAPI unsigned int TextCountCodepoints(const char *text); // Get total number of characters (codepoints) in a UTF8 encoded string
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf style)
RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
-RLAPI const char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (memory should be freed!)
-RLAPI const char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (memory should be freed!)
+RLAPI char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (memory should be freed!)
+RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (memory should be freed!)
RLAPI const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
RLAPI const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor!
diff --git a/src/text.c b/src/text.c
index 6b742fd2..eb956d1b 100644
--- a/src/text.c
+++ b/src/text.c
@@ -1215,7 +1215,7 @@ const char *TextSubtext(const char *text, int position, int length)
// Replace text string
// REQUIRES: strlen(), strstr(), strncpy(), strcpy()
// WARNING: Internally allocated memory must be freed by the user (if return != NULL)
-const char *TextReplace(char *text, const char *replace, const char *by)
+char *TextReplace(char *text, const char *replace, const char *by)
{
char *result;
@@ -1266,7 +1266,7 @@ const char *TextReplace(char *text, const char *replace, const char *by)
// Insert text in a specific position, moves all text forward
// REQUIRES: strlen(), strcpy(), strtok()
// WARNING: Allocated memory should be manually freed
-const char *TextInsert(const char *text, const char *insert, int position)
+char *TextInsert(const char *text, const char *insert, int position)
{
int textLen = strlen(text);
int insertLen = strlen(insert);