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 unexpected delimiter at start of line in to_hex formatter #2627

Merged
merged 1 commit into from
Feb 1, 2023
Merged

Fix unexpected delimiter at start of line in to_hex formatter #2627

merged 1 commit into from
Feb 1, 2023

Conversation

starsunyzl
Copy link
Contributor

When formatting as single line, there is an extra space at the beginning of the line. I think it's unexpected, not by design.

std::vector<int> vec{1, 2, 3, 4, 5, 6, 7};

// single line
spdlog::info("[{:n}]", spdlog::to_hex(vec.begin(), vec.end()));

// multi-line
spdlog::info("[{}]", spdlog::to_hex(vec.begin(), vec.end(), 3));
spdlog::info("[{:a}]", spdlog::to_hex(vec.begin(), vec.end(), 3));

@gabime gabime merged commit 927cc29 into gabime:v1.x Feb 1, 2023
@gabime
Copy link
Owner

gabime commented Feb 1, 2023

Thanks @starsunyzl

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