Skip to content
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

fix longestCommonSubstring() to handle unicode characters (#129) #176

Merged
merged 2 commits into from
Aug 28, 2018

Conversation

daddou-ma
Copy link
Contributor

A have fixed the longestCommonSubstring to handle unicode characters by spliting the string into an array of one character strings.

@codecov-io
Copy link

codecov-io commented Aug 22, 2018

Codecov Report

Merging #176 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #176   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files         134    134           
  Lines        2486   2487    +1     
  Branches      416    416           
=====================================
+ Hits         2486   2487    +1
Impacted Files Coverage Δ
...longest-common-substring/longestCommonSubstring.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 872a38f...53815c8. Read the comment docs.

@daddou-ma
Copy link
Contributor Author

before:

'𐌵𐌵**ABC'[0] // will result "�"

After:

Array.from('𐌵𐌵**ABC')[0] // will result "𐌵"

@trekhleb trekhleb changed the base branch from master to longest-substring-unicode-fix August 28, 2018 03:56
@trekhleb
Copy link
Owner

@daddou-ma thank you for the fix!

@trekhleb trekhleb merged commit 82ac89b into trekhleb:longest-substring-unicode-fix Aug 28, 2018
@daddou-ma
Copy link
Contributor Author

@trekhleb You're welcome ^^

harshes53 pushed a commit to harshes53/javascript-algorithms that referenced this pull request Dec 6, 2018
shoredata pushed a commit to shoredata/javascript-algorithms that referenced this pull request Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants