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

Feature/more string methods #725

Merged
merged 11 commits into from
Jan 22, 2024

Conversation

briandowns
Copy link
Contributor

What's Changed:

Adds collapseSpaces and wrap methods to string type.

Type of Change:

  • Bug fix
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Housekeeping:

  • Tests have been updated to reflect the changes done within this PR (if applicable).
  • Documentation has been updated to reflect the changes done within this PR (if applicable).

Screenshots (If Applicable):

@briandowns briandowns requested a review from Jason2605 January 14, 2024 03:54
@briandowns briandowns self-assigned this Jan 14, 2024
@Jason2605
Copy link
Member

Apologies I will get around to this! Will try my best to have a look tomorrow for you mate

@briandowns
Copy link
Contributor Author

Apologies I will get around to this! Will try my best to have a look tomorrow for you mate

At your leisure. No rush. :D

src/vm/datatypes/strings.c Outdated Show resolved Hide resolved
docs/docs/strings.md Outdated Show resolved Hide resolved
src/vm/datatypes/strings.c Outdated Show resolved Hide resolved
testStringCollapseSpaces() {
const testString = "This is a huge string of a lot of spaces.";
const expected = "This is a huge string of a lot of spaces.";
const res = testString.collapseSpaces();
Copy link
Member

Choose a reason for hiding this comment

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

Probably worth adding some tests to ensure the original string is also untouched

Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
Signed-off-by: Brian Downs <[email protected]>
@briandowns briandowns force-pushed the feature/more_string_methods branch from e0f3348 to c01149d Compare January 22, 2024 03:22
@Jason2605
Copy link
Member

Thanks for this!

@Jason2605 Jason2605 merged commit 8ba7fb5 into dictu-lang:develop Jan 22, 2024
8 checks passed
@Jason2605 Jason2605 mentioned this pull request Sep 12, 2024
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