Questa funzione sviluppata da Merlinox permette, tramite un regexp di escludere i tag html
<cfscript>
function incipit(stringa,lunghezza,puntini){
puntini2=len(stringa) gt lunghezza;
if (stringa is not “”){
// Remove all other tags
stringa = ReReplace(stringa, ‘<[^>]*>’, ”, ‘ALL’);
stringa=listDeleteAt(left(stringa,lunghezza),listLen(left(stringa,lunghezza),” “),” “);
}
if ((puntini) and (puntini2)) stringa=stringa & “…”;
return stringa;
}
</cfscript>
Nessun commento “CF – Troncare ed aggiungere i puntini”
Ma adesso divento famoso?
no, anzi al contrario amico mio 😛
Beh mejo! Così non devo fare autografi a nessuno!