I am new to developing windows phone apps. Now I am creating a text messenger app with T9 keyboard, I already made design like the buttons. Now what I want is how can I get the last character in a string? Example the string is "clyde", how can I get the char 'e' from that String? I am using Visual Basic as language.
UPDATE: Got it working now, I used this code:
string s = "clyde";
char e = s(s.Length-1);
To get the last N characters of a string, call the slice method on the string, passing in -n as a parameter, e.g. str. slice(-3) returns a new string containing the last 3 characters of the original string.
I'm not sure about which language are you using, but in C# it is done like
string s = "clyde";
char e = s[s.Length-1];
and it is very similar in every language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With