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

feat(formula): add FINDB function implementation #2538 #2547

Closed
wants to merge 8 commits into from

Conversation

sagarwal3005
Copy link

close #2538

Copy link

github-actions bot commented Jun 18, 2024

View Deployment

#9582153589

🥐 🍔 🥓 🥗 🥘 🌯 🍚 🍛 🍖 🍭 🍧 🍝 🥪 🥖 🍪
Still cooking, please come back later
🥙 🥮 🥨 🌭 🍦 🍙 🍕 🍰 🍮 🍜 🍡 🍱 🍿 🍕 🥟

describe('Find', () => {
it('Find text in single cell', () => {
const findText = StringValueObject.create('Univer');
const withinText = StringValueObject.create('Hello Univer');
Copy link
Member

@Dushusir Dushusir Jun 18, 2024

Choose a reason for hiding this comment

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

If withinText is "你好 Univer", the result will be 6

You can refer to the calculation of byte length in the LENB function, especially for characters in special languages. We have a public method for reference charLenByte, refer to

const textByteLen = charLenByte(textValue);

Additional note:

The purpose of making a public tool method charLenByte is to make modification and maintenance easier. This method is not necessarily perfect. If you can find a better solution, please contribute to us.

@Dushusir Dushusir added the qa:untested This PR is ready to be tested label Jun 18, 2024
@Dushusir
Copy link
Member

Pay attention to the format of the PR title. Use feat(formula): xxx

@sagarwal3005 sagarwal3005 changed the title feat(text): add FINDB function implementation #2538 feat(formula): add FINDB function implementation #2538 Jun 19, 2024
@Dushusir
Copy link
Member

Please check all test cases passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:untested This PR is ready to be tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Text Formula FINDB
2 participants