ttfGetNextTextSubString function

bool ttfGetNextTextSubString(
  1. Pointer<TtfText> text,
  2. Pointer<TtfSubString> substring,
  3. Pointer<TtfSubString> next
)

Get the next substring in a text object

If called at the end of the text, this will return a zero length substring with the TTF_SUBSTRING_TEXT_END flag set.

\param text the TTF_Text to query. \param substring the TTF_SubString to query. \param next a pointer filled in with the next substring. \returns true on success or false on failure; call SDL_GetError() for more information.

\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 bool SDLCALL TTF_GetNextTextSubString(TTF_Text *text, const TTF_SubString *substring, TTF_SubString *next)

Implementation

bool ttfGetNextTextSubString(Pointer<TtfText> text,
    Pointer<TtfSubString> substring, Pointer<TtfSubString> next) {
  final ttfGetNextTextSubStringLookupFunction = libSdl3Ttf.lookupFunction<
      Uint8 Function(Pointer<TtfText> text, Pointer<TtfSubString> substring,
          Pointer<TtfSubString> next),
      int Function(Pointer<TtfText> text, Pointer<TtfSubString> substring,
          Pointer<TtfSubString> next)>('TTF_GetNextTextSubString');
  return ttfGetNextTextSubStringLookupFunction(text, substring, next) == 1;
}