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

# SDL\_HasPrimarySelectionText(3)

Query whether the primary selection exists and contains a non-empty text string.

## NAME

SDL\_HasPrimarySelectionText - Query whether the primary selection exists and contains a non-empty text string.

## HEADER FILE

Defined in SDL3/SDL\_clipboard.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_HasPrimarySelectionText(void);**

## RETURN VALUE

Returns true if the primary selection has text, or false if it does not.

## THREAD SAFETY

This function should only be called on the main thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetPrimarySelectionText**(3)](/SDL_GetPrimarySelectionText/3.md), **•**(3), [**SDL\_SetPrimarySelectionText**(3)](/SDL_SetPrimarySelectionText/3.md)
