Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Question about using left
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bobby131313
Senior Member

USA
1163 Posts

Posted - 08 June 2011 :  13:15:13  Show Profile  Visit bobby131313's Homepage  Reply with Quote
So I'm truncating some RSS titles for display...

RSStitleshort = Left(RSStitle,35)

Works great. But is there a way to make it break at the first space after the value so it doesn't stop in the middle of a word?

Thanks in advance...

Switch the order of your title tags

HuwR
Forum Admin

United Kingdom
20593 Posts

Posted - 08 June 2011 :  14:51:33  Show Profile  Visit HuwR's Homepage  Reply with Quote
try something like
pos = Instr(34,RSStitle," ")
if pos = 0 then
pos = 35
end if
RSStitleshort = Left(RSStitle,pos)

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 08 June 2011 :  16:34:42  Show Profile  Visit bobby131313's Homepage  Reply with Quote
I had to tweak some other code that I *thought* wouldn't matter but that got me where I needed to be.

Thank You!

Switch the order of your title tags
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07