|
|
How to add string (after substr)
Hi,
Here is my problem-
I want to add a string 'Test-12345' after the substr to make the URL
like this-
https://test.com/FIND/find.cgi?testid=<output_from_substr>Test-12345
here is my code -
htext="A HREF=\"https://test.com/FIND/find.cgi?testid=";
text=substr($0,21,8);
printf("<TD ALIGN=\"LEFT\">");
printf("<%s%d\">%d</A>",htext,text,text);
printf("</TD>\n");
Can someone suggest on how to do that.
Thanks,
Riyaz
|
|
0
|
|
|
|
Reply
|
arjumandh (1)
|
2/24/2009 10:15:04 PM |
|
On Tue, 24 Feb 2009 14:15:04 -0800, arjumandh wrote:
> Hi,
>
> Here is my problem-
>
> I want to add a string 'Test-12345' after the substr to make the URL like
> this-
>
> https://test.com/FIND/find.cgi?testid=<output_from_substr>Test-12345
>
> here is my code -
>
> htext="A HREF=\"https://test.com/FIND/find.cgi?testid=";
> text=substr($0,21,8);
> printf("<TD ALIGN=\"LEFT\">");
> printf("<%s%d\">%d</A>",htext,text,text); printf("</TD>\n");
>
> Can someone suggest on how to do that.
text=substr($0,21,8) "Test-12345"
or
text = substr($0,21,8)
text = text "Test-12345"
--
T.E.D. (tdavis@mst.edu) MST (Missouri University of Science and Technology)
used to be UMR (University of Missouri - Rolla).
|
|
0
|
|
|
|
Reply
|
Ted
|
2/25/2009 12:21:44 AM
|
|
On Feb 24, 4:15=A0pm, arjuma...@gmail.com wrote:
> Hi,
>
> Here is my problem-
>
> I want to add a string 'Test-12345' after the substr to make the URL
> like this-
>
> https://test.com/FIND/find.cgi?testid=3D<output_from_substr>Test-12345
>
> here is my code -
>
> htext=3D"A HREF=3D\"https://test.com/FIND/find.cgi?testid=3D";
> =A0 =A0 =A0 =A0 text=3Dsubstr($0,21,8);
> =A0 =A0 =A0 =A0 printf("<TD ALIGN=3D\"LEFT\">");
> =A0 =A0 =A0 =A0 printf("<%s%d\">%d</A>",htext,text,text);
> =A0 =A0 =A0 =A0 printf("</TD>\n");
>
> Can someone suggest on how to do that.
>
> Thanks,
>
> Riyaz
print htext text "Test-12345"
Also lose the spurious semicolons and, if your going to use printf,
the spurious brackets.
Ed.
|
|
0
|
|
|
|
Reply
|
Ed
|
2/25/2009 12:24:36 AM
|
|
|
2 Replies
245 Views
(page loaded in 0.062 seconds)
|
|
|
|
|
|
|
|
|