Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

string_lettersdigits

CryoEagle edited this page Dec 26, 2018 · 2 revisions

string_lettersdigits

Returns a copy of a given string with everything but its letters and digits removed.

Syntax:

string_lettersdigits(str)
Argument Description
string str The string to convert to letters and digits

Returns: string

Description

This function will return a copy of a given string with everything but its letters and digits removed, which means it can be used to remove any unwanted characters (like "#" or "?") from, for example, a login name or a password.

Note: This function only detects the 26 letter english alphabet from A - Z.

Example:

if string_length(password) > string_length(string_lettersdigits(password))
{
 draw_text(32,32,"Invalid Password! Only Letters and numbers please!");
}

The above code will check the length of a string against the length of the same string, but with all symbols removed. If they are not the same a message is drawn on the screen.

Back to strings

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /