> Le 9 nov. 2017 à 06:10, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > Kirk, > One trick for counting the number of characters is : > > $n:=length($text) > $text:=replace string($text;$char;"") > $n:=$n-length($text) > > That will work for your text file.
I use this instead: $text:=replace string($text;$char;"";*) //that so magic little star… But *don't use* 'Replace string' with versions older than v15 R3 where it's been re written, guaranteed wheel of death (if not crash). With those versions, a Position(...;*) loop to count $char is much better. Some code here: <http://forums.4d.com/Post/FR/15925184/1/19384363#19384363> -- Arnaud de Montard ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************