0

I have to replace double semicolon (;;) in a string with single comma(,) in an apex class. Can someone help me?

1 Answer 1

5

You can use the replaceAll() method from the String class.

String testString = 'Hello;; my name is SF support.'; testString = testString.replaceAll(';;', ','); System.debug(testString); 

Result: Hello, my name is SF support.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.