From 896ff68540c362e1d7a0dbc14f7dcc3514463a69 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 18 Jan 2025 20:19:11 +0100 Subject: [PATCH] REVIEWED: Text functions usage notes #4704 --- src/raylib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/raylib.h b/src/raylib.h index 27a8ab049..0d47e16f8 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1502,7 +1502,8 @@ RLAPI int GetCodepointPrevious(const char *text, int *codepointSize); RLAPI const char *CodepointToUTF8(int codepoint, int *utf8Size); // Encode one codepoint into UTF-8 byte array (array length returned as parameter) // Text strings management functions (no UTF-8 strings, only byte chars) -// NOTE: Some strings allocate memory internally for returned strings, just be careful! +// WARNING 1: Most of these functions use internal static buffers, it's recommended to store returned data on user-side for re-use +// WARNING 2: Some strings allocate memory internally for the returned strings, those strings must be free by user using MemFree() RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending