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 #326: Allow to have space before/after | for enums #327

Conversation

antoineatstariongroup
Copy link
Contributor

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the COMET-SDK code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

Fix #326

Space before/after the '|' separator for multi-values enumeration is now allowed


for (var valueIndex = 0; valueIndex < values.Length; valueIndex++)
{
values[valueIndex] = Regex.Replace(values[valueIndex], @"^\s*|\s*$", "");
Copy link
Member

Choose a reason for hiding this comment

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

please use .Trim() instead of regex. I think Trim does what you want and is also faster (not that this gets called so many times) than a regex

Copy link

sonarqubecloud bot commented Apr 9, 2024

@antoineatstariongroup antoineatstariongroup merged commit c3b294e into development Apr 9, 2024
6 checks passed
@antoineatstariongroup antoineatstariongroup deleted the bug/gh326-support-of-spaced-separator-enumeration branch April 9, 2024 09:03
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.

ObjectValidation failure if separator is ' | '
3 participants