5003 Views
Sometime you need to trim or remove a charecter from left or right. For example:
http://devstudioonline.com
You need to remove http:// from left. Then you need a function to trim from left side with given charecters or string.
public static String ltrim(String str, String trimchar){
...
Sheetal Kumar
Oct 16, 2019
4352 Views
String is used to handle a function it is a sequence of characters .There are some of the string with example.
1. addcslashes :-
It return the String with backslashes before the character.
<?php
echo addcslashes('Hello[ ]', 'A..z');
?>
Output
\H\e\l\l\o\[ \]
2. addslashes ...
Anamika Gupta
Jul 14, 2018