[thelist] finding the period after X chars
MATTHEW BERNHARDT
bernhardt.7 at osu.edu
Sat Dec 23 00:39:56 CST 2006
Hey all,
In ASP/VBscript, you could use the InStr() function[1].
intCutoffPosition = InStr(200,yourTextVariable,".")
newText = left(yourTextVariable,intCutoffPosition) & " More..."
[1]http://www.w3schools.com/vbscript/func_instr.asp
Hope this helps,
Matt
----- Original Message -----
> Hi guys, I'm working on a "more..." style text cut off to use as a
> short description.
>
> I'm looking to take the first say, 200 characters or so, but I
> want it to run out until the next instance of a "." (period) is found, so
> as to make a complete sentence.
>
> anyone have a function handy? php, asp, whatever... i can convert
> it. just not sure of the technique.
More information about the thelist
mailing list