View Single Post
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-21-2018 , 15:48   Re: Replace first character in a string
Reply With Quote #13

Quote:
Originally Posted by BaD CopY View Post
Also how to replace first 2 characters with some new values ?

Values { 'ho', '+' }

so string "home" will be "+me"
PHP Code:
new const szGivenString "home";

new const 
szReplaceString[ ][ ] =
{
    { 
"ho""+" }
}

replaceszGivenStringcharsmaxszGivenString ), szReplaceString][ ], szReplaceString][ ] ); 
__________________

Last edited by edon1337; 07-21-2018 at 15:49.
edon1337 is offline