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

refactor lorem Data #619

Merged
merged 2 commits into from
Jun 1, 2024
Merged

Conversation

krupalbhat
Copy link
Contributor

This modification is done in reference to #569.

@krupalbhat
Copy link
Contributor Author

Hey, I will fix the tests and push. I didn't notice the changes in the CMake file, so in my system, tests were not built

@krupalbhat
Copy link
Contributor Author

In the lorem.cpp file:

  • I have changed the word() function to return string_view.

  • In other functions like words() and sentence(), a vector of string is created because the StringHelper::join() function expects std::vector<std::string> as a parameter. Since my modifications the word() function returns string_view, I am converting these string_views to strings in order to add them to the vector.

  • I was thinking we could create a vector of string_view and add another overloaded StringHelper::join() function that takes a vector of string_view as an argument. This function will join string_views to form string.

What do you think about this?

@cieslarmichal
Copy link
Owner

Good idea with overlosding, we can implement it :)

@cieslarmichal cieslarmichal merged commit 2583db2 into cieslarmichal:main Jun 1, 2024
5 of 6 checks passed
00thirdeye00 pushed a commit to 00thirdeye00/faker-cxx that referenced this pull request Jun 20, 2024
* refactor lorem Data

* Fixed build issues in lorem tests
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.

2 participants