function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ndrannapareddyndrannapareddy 

How to add character PIPE , | in string Apex

Hi All, 

I wanted to add Pipe in a string to send it make a webservice call . but Apex changes | to |

is there a way for me keep | as it is instead of changing the character.

Example :

String pipeString = 'Salesforce|Salesforce';
system.debug returns  :
Salesforce|Salesforce

is there anyway i get aound this?



 
nickwick76nickwick76
Hi, 
Maybe you can decode it before you use it?

// Niklas