Skip to content

Clarify byte literal usage in first_word example#4759

Open
JUSTud-ing wants to merge 1 commit into
rust-lang:mainfrom
JUSTud-ing:explain-byte-literal
Open

Clarify byte literal usage in first_word example#4759
JUSTud-ing wants to merge 1 commit into
rust-lang:mainfrom
JUSTud-ing:explain-byte-literal

Conversation

@JUSTud-ing

Copy link
Copy Markdown

While reading Chapter 4, I found the explanation around b' ' being unclear.

The original text mentions "byte literal syntax" but doesn't explain what b' ' represents.

This change clarifies that the loop compares bytes from s.as_bytes() against the byte literal b' ', which represents an ASCII space character, and briefly explains the b prefix.

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.

1 participant