Recording characters in an array and finding values about them

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]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…