I am trying to access the charCodeAt(index) function, part of JS. Is there no way to get to the built in Javascript functions, or is there a comparable function built into mono? The function takes a character at the index, and changes it to the unicode character code...
Oh, wait. Nevermind. Noticed I was using the function wrong. needs to be like: Code (csharp): var myString ="bobobobo"; myString.charCodeAt(0); Instead of trying to find it in System.* /* Edit */ err, maybe my quetsion is still valid. I tried that and it says "System.MissingMethodException: Cannot find method charCodeAt"
I would have swore I tried that and I couldn't seem to get anything out of it... I shall try that later today.
Normally I would have expected doing something like: Code (csharp): if (name[a] == 'a') would work (note single quotes)... Seems to generate a compiler error. (Unexpected char). // Edit Talked to aarku, and he said to try doing it like this: Code (csharp): if (name[a] == "a"[0]) Which again, didn't work. It spat out the error: "Operator == cannot be used with a left hand side type of System.Object and a right hand side of type System.Char" So he suggested that I just make a char buffer that I store name[a] in first, and then check if they are ==, which worked.