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

1476: Support double-byte chars for LEFT(),RIGHT(), LEN() and MID(). #1477

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

FlowingSPDG
Copy link
Contributor

@FlowingSPDG FlowingSPDG commented Feb 20, 2023

PR Details

Support double-byte characters support for string functions such as LEFT().

Description

Added double bytes chars support by using utf counting.

Related Issue

#1476

Motivation and Context

I was using Excel sheet that has Japanese characters in it, but those formulas were not supported at the moment,

How Has This Been Tested

Added testing

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@FlowingSPDG
Copy link
Contributor Author

FlowingSPDG commented Feb 20, 2023

I will add more tests for those functions if needed.
perhaps LEFTB/RIGHTB/MIDB should use current code since it counts bytes instead of text length.

@xuri xuri added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2023

Codecov Report

Merging #1477 (24669ba) into master (cb0c1b0) will not change coverage.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##           master    #1477   +/-   ##
=======================================
  Coverage   98.68%   98.68%           
=======================================
  Files          31       31           
  Lines       24274    24274           
=======================================
  Hits        23956    23956           
  Misses        210      210           
  Partials      108      108           
Flag Coverage Δ
unittests 98.68% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
calc.go 99.03% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution.

@xuri xuri merged commit 983cd76 into qax-os:master Feb 20, 2023
@FlowingSPDG
Copy link
Contributor Author

Thank you for quick response! I have added some testing and xxxB(LENB/RIGHTB/MIDB) function code so let me make PR again.

@FlowingSPDG FlowingSPDG mentioned this pull request Feb 20, 2023
10 tasks
xuri pushed a commit to JDavidVR/excelize that referenced this pull request Jul 11, 2023
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this pull request Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants