Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Removing number of characters from end of string

LEGEND ,
Sep 23, 2008 Sep 23, 2008

Copy link to clipboard

Copied

Hi all....
Dooza very kindly helped me with trimming a string in an earlier post, but
now i want to remove the last four characters from a string.
I really should know how to do this and will have to do some bedtime reading
:-|

But, for now, could someone help!

Thanks
Andy


TOPICS
Server side applications

Views

315
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 23, 2008 Sep 23, 2008

Copy link to clipboard

Copied

Andy wrote:
> Hi all....
> Dooza very kindly helped me with trimming a string in an earlier post, but
> now i want to remove the last four characters from a string.
> I really should know how to do this and will have to do some bedtime reading
> :-|
>
> But, for now, could someone help!

Hi Andy,
Try something like this:
<%
myStr = "this is my really long string"
Response.Write(LEFT(myStr,LEN(myStr) -4))
%>

Dooza

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 23, 2008 Sep 23, 2008

Copy link to clipboard

Copied

Ah Dooza - Thank You.
To the rescue again :-D

You're helping me to see the logic...

Thanks Again
Andy


"Dooza" <doozadooza@gmail.com> wrote in message
news:gbafel$ra3$1@forums.macromedia.com...
> Andy wrote:
>> Hi all....
>> Dooza very kindly helped me with trimming a string in an earlier post,
>> but now i want to remove the last four characters from a string.
>> I really should know how to do this and will have to do some bedtime
>> reading :-|
>>
>> But, for now, could someone help!
>
> Hi Andy,
> Try something like this:
> <%
> myStr = "this is my really long string"
> Response.Write(LEFT(myStr,LEN(myStr) -4))
> %>
>
> Dooza


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 23, 2008 Sep 23, 2008

Copy link to clipboard

Copied

LATEST
Andy wrote:
> Ah Dooza - Thank You.
> To the rescue again :-D
>
> You're helping me to see the logic...
>
> Thanks Again
> Andy

I like the help when I can... to give something back after receiving so
much help over the years.

There are lots of useful ASP functions that can do all sorts of string
manipulations, you just need to have a play and try to remember them :)

Dooza

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines