TCL question: count occurrence of a character ...
Peter Danecek
Peter.Danecek at bo.ingv.it
Tue Dec 10 07:18:14 PST 2013
Hi all,
I would like to count the occurrences of a character, more specifically of the `.` in the ${version} option. Asking Big Brother Google, there seem to be quite some possibilities, so I came up with the following solutions:
set dot_count [ regsub -all "\\." ${version} {} ignore ]
but I do not like it particularly and I am wondering if there would be a more elegant expression you would propose.
Thanks!
~petr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1762 bytes
Desc: not available
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20131210/10d2bb37/attachment.p7s>
More information about the macports-dev
mailing list