-
-
Notifications
You must be signed in to change notification settings - Fork 18
clipboard_has_text
drewmccluskey edited this page Nov 28, 2018
·
1 revision
Returns whether there is any text in the clipboard.
clipboard_has_text();
Returns: Boolean
This function will return true if the clipboard contains text or false if it does not.
NOTE: This function is only valid for the Windows target.
if clipboard_has_text()
{
str = clipboard_get_text();
clipboard_set_text("");
}
The above code checks the clipboard for text and if it contains any, it is read as a string into the variable "str". Finally, the clipboard is cleared by setting it to an empty string.
Back to strings