# .lenght function

**URL:** <https://discourse.processing.org/t/lenght-function/25015>\
**Category:** Beginners\
**Created:** [October 29, 2020, 3:22pm UTC](https://discourse.processing.org/t/lenght-function/25015 "2020-10-29T15:22:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moms\_spaghetti](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@moms\_spaghetti](https://discourse.processing.org/u/moms_spaghetti)\
**Post date:** [October 29, 2020, 3:22pm UTC](https://discourse.processing.org/t/lenght-function/25015/1 "2020-10-29T15:22:39Z")

</div>

Hello  
Am I the only one where the .lenght doesnt work??  
String name = “test”;  
int lenght = name.lenght();  
this gives me the error “The function “.lenght()” does not exist”  
while here [https://processing.org/reference/String\_length\_.html](https://processing.org/reference/String_length_.html) it says it does exist.  
has the function been removed??

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [October 29, 2020, 3:56pm UTC](https://discourse.processing.org/t/lenght-function/25015/2 "2020-10-29T15:56:40Z")

</div>

Typo

length versus lenght

It’s written with “th”, `.length()`

**Please note**

- for String its name.length(); with ()

- array name.length; without ()

- ArrayList `name.size();`

Chrisir
