Skip to content

Use char indexing instead of input.codePoints().toArray() #34

Open

Description

@sttk

Use

  for (int i = 0; i < text.length(); i++) {
      char c = text.charAt(i);
      ...
  }

instead of

  for (int cp : input.codePoints().toArray()) {
      ..
  }

because the former way is faster than the latter.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions