If the REPLACEMENTLIST is empty, the SEARCHLIST is replicated. This latter is useful for counting characters in a classFurthermore, this used to effectively replace characters by themselves, causing it to fail on read-only values, but that has been fixed. Now tr/%// merely counts.
In reply to Re^3: Counting how many times a character is in a string.
by bart
in thread Counting how many times a character is in a string.
by slloyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |