# Counting the number of lines in a String

**URL:** <https://forum.kirupa.com/t/counting-the-number-of-lines-in-a-string/207926>\
**Category:** flash\
**Created:** [November 22, 2006, 9:10pm UTC](https://forum.kirupa.com/t/counting-the-number-of-lines-in-a-string/207926 "2006-11-22T21:10:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZumoWrestler](https://avatars.discourse-cdn.com/v4/letter/z/f05b48/32.png) [@ZumoWrestler](https://forum.kirupa.com/u/ZumoWrestler)\
**Post date:** [November 22, 2006, 9:10pm UTC](https://forum.kirupa.com/t/counting-the-number-of-lines-in-a-string/207926/1 "2006-11-22T21:10:27Z")

</div>

I was wondering if there was a way to count the number of lines in a string. Example…

```auto
 
var blah:String = String("Blah 
 Blah
 Blah!")

```

I was wondering if there was a tokenizer or a method of counting the  
or maybe something like the .length property. Thanks for the help everyone!
