Question : Coldfusion -splittext

Hello experts.
I need help to split a text-dokument.
I have one place on my page where i want to show a part of a text dokument i have in my dadtabase.
So i need to split it.I think that i can check the number of characters and set a limit but i don't want to have a half word in the end.I also need to show something like like (more.....) if there is more text.
(have in mind that the dokument is a large text file.Would it be a better idea to save this part of the text in  a separate  table column and make the spliting while i'm inserting the document in the database?)

Any help?
1:
2:
3:
4:
5:
<cfoutput query="centerpanel" group="art_id">
<cfoutput>something else</cfoutput>
<!--- the text to split --->
#art_artikeldetail#
</cfoutput>

Answer : Coldfusion -splittext

>> i don't want to have a half word in the end.I also need to show something
>> like like (more.....) if there is more text.

The FormatTeaser function at cflib.org can do all that
http://www.cflib.org/udf/FormatTeaser

>> Would it be a better idea to save this part of the text in  a separate  table column
>> and make the spliting while i'm inserting the document in the database?

It depends.  If you're generating a "teaser" for a bunch of records and DON'T need the full text ... and the majority of your records to contain a _lot_ more data than your "limit"  .. then yes, it might be a good idea.  It would avoid having to pull lots of data over the network when you don't even need all of it.  It does require more storage.  But disk space is cheap.  


Random Solutions  
 
programming4us programming4us