Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ch04-03-slices.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Here’s a small programming problem: write a function that takes a string of
words separated by spaces and returns the first word it finds in that string.
If the function doesn’t find a space in the string, the whole string must be
one word, so the entire string should be returned.
The function doesn't need to handle input strings that have leading space
characters.

Let’s work through how we’d write the signature of this function without using
slices, to understand the problem that slices will solve:
Expand Down