[Extension] Strings - Useful character collections

I’ll keep this one short, because the extension I’ve made today is a very small one. Very similar and inspired by the python module with the same name, the strings namespace is just a collection of constants that might come in handy. This extension is JS exclusive. If there’s demand for it, I might update it to support blocks


Available constants

Digits - this constant includes all the digits from 0-9, in string form.

strings.digits -> "0123456789"

Lowercase letters - this constant includes the english alphabet in lowercase only

strings.lowercase -> "abc...xyz"

Uppercase letters - this constant includes the english alphabet in uppercase only

strings.uppercase -> "ABC...XYZ"

Special characters - this constant includes special characters from the standard ASCII table. Only usual special characters are included, letters with motifs or rarely used/proprietary/broken symbols were omitted

strings.special -> "!\"#$%&'()*+,-./:;<=>?@[\]^_{|}~`"

Whitespace - this constant includes empty or invisible characters (space & tab)

strings.whitespace -> " \t" //(\t is the escape character for tab)

Letters - this constant is a combination of uppercase and lowercase letters from the english alphabet

strings.letters -> "abc...xyz" + "ABC...XYZ"

Alphanumeric - this constant includes the full upper and lowercase alphabet as well as digits

strings.alphanumeric -> "abc...xyz" + "ABC...XYZ" + "0...9"

Ascii - this constant includes most visible standard ascii character commonly used (upper and lowercase letters, digits and special characters)

strings.ascii -> "abc...xyz" + "ABC...XYZ" + "0...9" + "!\"#$%&'()*+,-./:;<=>?@[\]^_{|}~`"

And, that’s the whole extension! It’s just a namespace with a bunch of exported constants I quickly put together. I mainly made it to make development easier for myself, but I decided to share it so others can use these constants in their code too!

You can import the extension from here:

7 Likes

So no ñ?

It’s supposed to be a set of constants for quick lookup like digits and letters. Special letters were not included

2 Likes

:loudspeaker: Sudden revival moment!

I updated this extension to support blocks now!

image

image

Get the extension here:

3 Likes

Imporant announcement

I changed my GitHub username, so please remove this extension in any project you may have it imported, and instead import the new link under my new username (sargedev).

This is not necessary, as the extension should still work, but it would be the safest option. By importing the new link you will also get access to any new updates.

WARNING: Do not import the new link before removing the old one, as this could cause conflicts

2 Likes