This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
cvanmeer
Halfop
Posts: 40 Joined: Tue Dec 02, 2003 1:00 pm
Location: The Netherlands
Contact:
Post
by cvanmeer » Tue Jan 06, 2004 4:26 pm
Hi all,
I have a question.
Let's say I have a variable that outputs news posts.
But I only want to display the first 40 characters + "..."
example:
sifhkshsdlgksdg;lsfgjewpogjeposdopbnkhfsidfhsifoswiofsnfoiansfioan
must become:
sifhkshsdlgksdg;lsfgjewpogjepos...
or something like that.
can someone help me?
I've searched in the forum for something like this, but could not find anything.
thx
Chrizz
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Jan 06, 2004 4:29 pm
Check the
string range manual..
Once the game is over, the king and the pawn go back in the same box.
cvanmeer
Halfop
Posts: 40 Joined: Tue Dec 02, 2003 1:00 pm
Location: The Netherlands
Contact:
Post
by cvanmeer » Tue Jan 06, 2004 4:32 pm
I've checked it out be-4 I posted it here, I can't seem to make it work
could you give me an example script line?
thx
Chrizz
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Jan 06, 2004 4:44 pm
It's simple.. I have a line let's call it myline formed this "qwertyuiopasdfghjklzxcvbnm" .. this in tcl will be set myline "qwertyuiopasdfghjklzxcvbnm". Now I want to get from that line a range of characters from 0 to let's say 10, then I'll use "string range $myline 0 10" and I'll get as an result "qwertyuiopa"
Once the game is over, the king and the pawn go back in the same box.
cvanmeer
Halfop
Posts: 40 Joined: Tue Dec 02, 2003 1:00 pm
Location: The Netherlands
Contact:
Post
by cvanmeer » Wed Jan 07, 2004 3:34 am
thx