mIRC Home    About    Download    Register    News    Help

Print Thread
Need some help with $replace :) #162645 20/10/06 10:02 PM
Joined: Mar 2003
Posts: 27
Z
zorin Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Mar 2003
Posts: 27
I want the first letter to be replaced with a uppercase letter

Code:
//var %one poteto potato | var %two $replace(%one,p,P) | echo %two

Returns: Poteto Potato
But I only want the first letter to be replaced.

Code:
//var %one poteto potato | var %two $replace( $left(%one,1) ,p,P) | echo %two

Testing something like this, but it only returns the first letter.. not the rest of the word

Re: Need some help with $replace :) #162646 20/10/06 10:20 PM
Joined: Jul 2005
Posts: 40
K
Karas Offline
Ameglian cow
Offline
Ameglian cow
K
Joined: Jul 2005
Posts: 40
//var %a = pota pota | echo -a $upper($left(%a,1)) $+ $mid(%a,2)

smile


j0k3r @ k4s.ch
Re: Need some help with $replace :) #162647 20/10/06 10:37 PM
Joined: Mar 2003
Posts: 27
Z
zorin Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Mar 2003
Posts: 27
Awsome! Tnx for the fast reply laugh