Salesforce Fact #268 | Iterate over string in apex

Apex does not support char data type. So, suppose we have to iterate over the characters over a string. We can use substring() method to get the characters at each index.

Attached are the screenshots.




Comments

Post a Comment

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow