# Recording characters in an array and finding values about them

**URL:** <https://forum.kirupa.com/t/recording-characters-in-an-array-and-finding-values-about-them/279169>\
**Category:** Uncategorized\
**Created:** [January 10, 2009, 2:47pm UTC](https://forum.kirupa.com/t/recording-characters-in-an-array-and-finding-values-about-them/279169 "2009-01-10T14:47:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![caglaruyar](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@caglaruyar](https://forum.kirupa.com/u/caglaruyar)\
**Post date:** [January 10, 2009, 2:47pm UTC](https://forum.kirupa.com/t/recording-characters-in-an-array-and-finding-values-about-them/279169/1 "2009-01-10T14:47:38Z")

</div>

hi, this is about strings and making a very simple search in dynamic text to find characters range and etc.

[COLOR=Blue]var[/COLOR] letters:[COLOR=Blue]String[/COLOR] = dinamik\_txt.[COLOR=Blue]text[/COLOR];  
[COLOR=Blue]var[/COLOR] record:[COLOR=Blue]Array[/COLOR]=[COLOR=Blue]new Array/COLOR;  
//making all characters an element of our array  
//spaces are not taken as an element of our array, so we only take account the characters  
[COLOR=Blue]for [/COLOR](i=0; i\<letters.[COLOR=Blue]length[/COLOR]; i++) {  
[COLOR=Blue]if[/COLOR](letters.[COLOR=Blue]charAt/COLOR!==[COLOR=SeaGreen]" “[/COLOR])  
{  
record\* = letters.[COLOR=Blue]charAt/COLOR;  
[COLOR=Blue] trace/COLOR;  
}[COLOR=Blue]else[/COLOR]  
{[COLOR=Blue]trace[/COLOR]([COLOR=SeaGreen]“there is space here”[/COLOR]);  
}  
}  
//making search for character which we want to find, you can change “e”  
//you can also make user enter the characters that s/he wants to find, with a dynamic text box and button  
[COLOR=Blue]for[/COLOR] (a=0; a\<letters.[COLOR=Blue]length[/COLOR]; a++) {  
[COLOR=Blue]if [/COLOR](record[a] == [COLOR=SeaGreen]“e”[/COLOR]) {  
[COLOR=Blue]trace[/COLOR](a+1 +[COLOR=SeaGreen] [COLOR=SeaGreen]”.character: e"[/COLOR][/COLOR]);  
}  
}

I wish you good work…
