# Character comparisons

**URL:** <https://forum.kirupa.com/t/character-comparisons/226029>\
**Category:** flash\
**Created:** [May 17, 2007, 4:08pm UTC](https://forum.kirupa.com/t/character-comparisons/226029 "2007-05-17T16:08:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EvangelosRoxxor](https://avatars.discourse-cdn.com/v4/letter/e/a88e57/32.png) [@EvangelosRoxxor](https://forum.kirupa.com/u/EvangelosRoxxor)\
**Post date:** [May 17, 2007, 4:08pm UTC](https://forum.kirupa.com/t/character-comparisons/226029/1 "2007-05-17T16:08:26Z")

</div>

I am trying to compare characters in a string, which is created based on user entry. This is an example of what I have right now:

```auto

theText = new String(inputText_variable);

i = 0;

if ((theText.charAt(i) == "#" || theText.chatAt(i) == "*") && (i == 0)) {
            trace ("Woot");
        }

```

Now the problem I have is that if I enter ‘#blahblah’, it will detect the # and trace Woot, while if I enter ‘\*blahblah’ it won’t even register that the \* is in the string.

Anyone have any suggestions as to why this is?
