-
-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improve readability and optimize toPosition function (#2928)
Refactors the string.toPosition function to improve readability and optimize the code. The main changes include: • Renaming variables to more descriptive names. • Optimized pattern matching by reusing patterns. • Returning nil when no pattern is matched, improving error handling. These changes make the code clearer and more efficient without altering its functionality.
- Loading branch information
1 parent
665e90c
commit 2735b8c
Showing
2 changed files
with
16 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters