# Check for letters-only string

**URL:** <https://discourse.julialang.org/t/check-for-letters-only-string/41091>\
**Category:** New to Julia\
**Created:** [June 9, 2020, 8:11pm UTC](https://discourse.julialang.org/t/check-for-letters-only-string/41091 "2020-06-09T20:11:55Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [June 9, 2020, 10:43pm UTC](https://discourse.julialang.org/t/check-for-letters-only-string/41091/9 "2020-06-09T22:43:01Z")

</div>

Note that @tamasgal’s example only detects lowercase letters. To also detect uppercase letter, you also need to check against `0x41` through `0x5a`. It’s probably also easier to understand if you write this as `'a' <= c <= 'z' || 'A' <= c <= 'Z'`, so you don’t convert to`UInt8` first and have to remember all the ASCII codes, since you can just compare `Char`s directly.

---

_[View the full topic](https://discourse.julialang.org/t/check-for-letters-only-string/41091)._
