You need to sign in to do that
Don't have an account?
Shilpa Kamble
How to get a next alphabet in alphabetical sequence in apex class?
How can I get the next alphabetical character in alphabetical sequence?
ex. I have 'A' letter, I want 'B' by using 'A'.
ex. I have 'A' letter, I want 'B' by using 'A'.
Try looking into the Apex String Class (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_string.htm). I was able to do something like what you are asking for however its based on the ASCII numeric representations of the characters and doesnt necessarily give you the next letter if your letter is for example 'Z'. More on ASCII here (http://www.asciitable.com/) (use decimal values). Anyhow this is how I am able to get the 'next' character in alphabetical order. try something like this:
Hope this helps!
AM