getSubStringsForRange method

List<TtfxSubString> getSubStringsForRange(
  1. int offset,
  2. int length
)

Get the substrings of a text object that contain a range of text.

\param text the TTF_Text to query. \param offset a byte offset into the text string. \param length the length of the range being queried, in bytes, or -1 for the remainder of the string. \param count a pointer filled in with the number of substrings returned, may be NULL. \returns a NULL terminated array of 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.

\threadsafety This function should be called on the thread that created the text.

\since This function is available since SDL_ttf 3.0.0.

extern SDL_DECLSPEC TTF_SubString ** SDLCALL TTF_GetTextSubStringsForRange(TTF_Text *text, int offset, int length, int *count)

Implementation

List<TtfxSubString> getSubStringsForRange(int offset, int length) =>
    ttfxGetTextSubStringsForRange(this, offset, length);