Skip to main content
Inspiring
September 23, 2008
Question

Removing number of characters from end of string

  • September 23, 2008
  • 3 replies
  • 338 views
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


This topic has been closed for replies.

3 replies

Inspiring
September 23, 2008
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
Inspiring
September 23, 2008
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


Inspiring
September 23, 2008
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