---
name: "TTF_SubString"
section: "3type"
platform: "linux"
package: "libsdl3-ttf-doc"
version: "3.2.2+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/TTF_SubString"
---

# TTF\_SubString(3type)

The representation of a substring within text.

## NAME

TTF\_SubString - The representation of a substring within text.

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

```
#include "SDL3_ttf/SDL_ttf.h"
```

**typedef struct TTF\_SubString** **{**     **TTF\_SubStringFlags flags;   /\*\*\< The flags for this substring \*/**     **int offset;                 /\*\*\< The byte offset from the beginning of the text \*/**     **int length;                 /\*\*\< The byte length starting at the offset \*/**     **int line\_index;             /\*\*\< The index of the line that contains this substring \*/**     **int cluster\_index;          /\*\*\< The internal cluster index, used for quickly iterating \*/**     **SDL\_Rect rect;              /\*\*\< The rectangle, relative to the top left of the text, containing the substring \*/** **} TTF\_SubString;**

## AVAILABILITY

This struct is available since SDL\_ttf 3.0.0.

## SEE ALSO

**•**(3), [**TTF\_GetNextTextSubString**(3)](/TTF_GetNextTextSubString/3.md), **•**(3), [**TTF\_GetPreviousTextSubString**(3)](/TTF_GetPreviousTextSubString/3.md), **•**(3), [**TTF\_GetTextSubString**(3)](/TTF_GetTextSubString/3.md), **•**(3), [**TTF\_GetTextSubStringForLine**(3)](/TTF_GetTextSubStringForLine/3.md), **•**(3), [**TTF\_GetTextSubStringForPoint**(3)](/TTF_GetTextSubStringForPoint/3.md), **•**(3), [**TTF\_GetTextSubStringsForRange**(3)](/TTF_GetTextSubStringsForRange/3.md)
