S
sudip05
Hi All,
I am having a senmtence. After the first word, I have to add a
single space there...can anybody gimme a coincise code. I tried
breaking up the sentence, but it removes the spaces also which I dont
want.
Code snippet
first line: selects lineString example: "int *ptr ptr is a pointer"
if($lineString =~ m/(\s*\@param\s*)\*(.*\r*\n*)/)
{
$lineString = $1.$2; /*$1 is "int " $2 is "ptr is a pointer"
*/
I have to produce output like "int ptr(then 1 single space) is a
pointer". So I have to manipulate $2 in such a way that after first
word in $2, there goes another extra space.
Can anybody help.
Thanks,
sudip
I am having a senmtence. After the first word, I have to add a
single space there...can anybody gimme a coincise code. I tried
breaking up the sentence, but it removes the spaces also which I dont
want.
Code snippet
first line: selects lineString example: "int *ptr ptr is a pointer"
if($lineString =~ m/(\s*\@param\s*)\*(.*\r*\n*)/)
{
$lineString = $1.$2; /*$1 is "int " $2 is "ptr is a pointer"
*/
I have to produce output like "int ptr(then 1 single space) is a
pointer". So I have to manipulate $2 in such a way that after first
word in $2, there goes another extra space.
Can anybody help.
Thanks,
sudip