substr function is also used to alter an existing string.

substr function is also used to alter an existing string. Correct Answer True

substr function works in a versatile way. It can also be used for altering an existing string i.e. we can edit an existing string. For example, $x= “abcdijklm” substr($x,4,0)= “efgh” ; // stuff $x with efgh without replacing any charcaters print “$x” ; //$x is now abcdefghijklm

Related Questions

What will be the output of the following PHP code? "convertSpace")); ?>
What will be the output when the following program is compiled and executed? abstract class TestAbstract{ String my_name; String myName(){ my_name = "Examveda"; return my_name; } abstract void display(); } public class Test extends TestAbstract{ void display(){ String n = myName(); System.out.print("My name is "+ n); } public static void main(String args[]){ Test t = new Test(); t.display(); } }