Skip to content

Commit

Permalink
REVIEWED: TextJoin(), convert const char ** to char**
Browse files Browse the repository at this point in the history
It generates multiple issues: https://c-faq.com/ansi/constmismatch.html
  • Loading branch information
raysan5 committed Jan 11, 2025
1 parent 8e450e4 commit e227371
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/raylib.h
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ RLAPI const char *TextFormat(const char *text, ...);
RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
RLAPI char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
RLAPI char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
RLAPI char *TextJoin(char **textList, int count, const char *delimiter); // Join text strings with delimiter
RLAPI 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!
RLAPI int TextFindIndex(const char *text, const char *find); // Find first text occurrence within a string
Expand Down
2 changes: 1 addition & 1 deletion src/rtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ char *TextInsert(const char *text, const char *insert, int position)

// Join text strings with delimiter
// REQUIRES: memset(), memcpy()
char *TextJoin(const char **textList, int count, const char *delimiter)
char *TextJoin(char **textList, int count, const char *delimiter)
{
static char buffer[MAX_TEXT_BUFFER_LENGTH] = { 0 };
memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH);
Expand Down

0 comments on commit e227371

Please sign in to comment.