Una funzione per omettere

E' l'area in cui è possibile condividere funzioni personalizzate nate dalla creatività e l'esperienza degli sviluppatori FileMaker

Moderatore: Moderatori

Rispondi
raybaudi
Messaggi: 3616
Iscritto il: sabato 7 febbraio 2004, 1:00
Località: Roma
Contatta:

Una funzione per omettere

Messaggio da raybaudi » martedì 3 dicembre 2013, 9:08

Volevate omettere determinati caratteri da un testo ?
Tipo:
eliminare tutte le vocali Omit ( text ; "aeiouAEIOU" )
eliminare tutti i "ritorno a capo" Omit ( text ; ¶ )
eliminare alcuni simboli Omit ( text ; "^!.?," )
ecc.

Questa è la funzione che vi serve ed è rapidissima anche per lunghissimi testi !
Notare che l'eliminazione è "case sensitive", per cui potreste voler omettere tutte le "Z" e non le "z"

/*
Omit ( text ; string ) custom function

Author: Daniele Raybaudi

This custom function omits the chars of the string from the given text, without any practical limitation.

*/

Let(
$cfOmit = $cfOmit + 1;
Case (
$cfOmit ≤ Length ( string ) ; Omit ( Substitute ( text ; Middle ( string ; $cfOmit ; 1 ) ; "" ) ; string ) ;
Let( $cfOmit = "" ; text )
)
)
Raybaudi FMP 12 Adv. Windows XP SP3

Rispondi