I want to find and replace to first character of the string.I used all replace functions but i don’t find the any answer for my question.
For example; my string is : /Baris/Pega/dev I want to replace “/” to “” the first character but replaceAll function replace all “/” characters. I tryed to use startsWith funtion with replaceAll functions but it doesnt work.Like this:
@Anoop Krishna Substring function gives the first character of the string,how can combine the functions for the change just first character of the string.
@Baris_ERENLER you can try this- get first character using length function and substring function. Then after that you can store the remaining part of the string using whatcomesafter or substring. Now we have 2 parts of string, 1st letter and remaining part. Now replaceall to the first part.
Thank you for your Supports. @Anoop Krishna According to your advices,Firstly I used startsWith function if it is true than used substring funciton like this;