Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Check for letters-only string

$
0
0

Python can check whether a string contain only letters with isalpha():

a_few = “abcdefghijk”
a_few.isalpha()
True

mixed = “abc45defg”
mixed.isalpha()
False

I have found Julia’s isletter() but it is limited to checking a single character.
How can Julia check for letters-only string?

10 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles