New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use tr/// for counting, not split #17

Merged
merged 1 commit into from Mar 4, 2015

Conversation

Projects
None yet
2 participants
@rjbs
Collaborator

rjbs commented Mar 4, 2015

We can use tr/// to count character occurances in a string,
which avoids making a lot of copies of the string contents
that you would get with split.

This also avoids length(@array), which is a mistake in 999,999
times out of a million. Thus, this fixes #11.

use tr/// for counting, not split
We can use tr/// to count character occurances in a string,
which avoids making a lot of copies of the string contents
that you would get with split.

This also avoids length(@array), which is a mistake in 999,999
times out of a million.  Thus, this fixes #11.

This was referenced Mar 4, 2015

pvande added a commit that referenced this pull request Mar 4, 2015

Merge pull request #17 from rjbs/char-count
use tr/// for counting, not split

@pvande pvande merged commit 94e73a8 into yanick:master Mar 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment