Hi,

I saw an interesting piece of code in one of the far corners of the Internet
today, but I encounter a little problem when I try to transplant this to
OpenBD.

Here is the interesting piece - the code cuts of a chunk of text at 25 words
using a list/array trick using java:

<cfset javaArray = CreateObject("java","java.util.Arrays") />
<cfset wordArray = javaArray.copyOf(javaCast("array",LongTextString.Split( "
" )), 26) />

Now - in OpenBD I get a message "Method copyOf is ambiguous as there is more
than one method that could correspond to the provided argument types. If
possible, use 'javacast()' to resolve this ambiguity." - but one can not
javacast to an array, right?

So how would I go about doing this in OpenBD?

Bonus points if anyone can come up with some alternative way to cut off a
big chunk of text at 25 words without using a loop (regexp, anyone?)

Thanks!
Hugo

PS - I got the snippet from here:
<http://www.stephenwithington.com/blog/index.cfm/2009/10/5/Using-ColdFusion-
to-Generate-Meta-Keywords-and-Description-For-Mura-CMS>

--
Hugo Ahlenius
fraxinus (at-sign) oxel.net
http://www.oxel.net 






--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official site @ http://www.openbluedragon.org/

!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to