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

Removing number of characters from end of string

LEGEND ,
Sep 23, 2008 Sep 23, 2008
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
316
Translate
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
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
Translate
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
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


Translate
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
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
Translate
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