TTF_GetTextSubStringsForRange - Get the substrings of a text object that contain a range of text.
Contents
Availability
This function is available since SDL_ttf 3.0.0.
SDL_ttf SDL_ttf 3.2.2 TTF_GetTextSubStringsForRange(3)
Function Parameters
text the TTF_Text
to query.
offset a byte offset into the text string.
length the length of the range being queried, in bytes, or -1 for the remainder of the string.
count a pointer filled in with the number of substrings returned, may be NULL.
Header File
Defined in SDL3_ttf/SDL_ttf.h
Name
TTF_GetTextSubStringsForRange - Get the substrings of a text object that contain a range of text.
Return Value
( TTF_SubString)ReturnsaNULLterminatedarrayof substring pointers or NULL on failure; call
SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free()
when it is no longer needed.
Synopsis
#include"SDL3_ttf/SDL_ttf.h"TTF_SubString**TTF_GetTextSubStringsForRange(TTF_Text*text,intoffset,intlength,int*count);
Thread Safety
This function should be called on the thread that created the text.
