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

Fixes in comments. #207

Merged
merged 1 commit into from
Feb 12, 2020
Merged
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
8 changes: 4 additions & 4 deletions src/split.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ rcutils_split(

size_t string_size = strlen(str);

// does it start with a delmiter?
// does it start with a delimiter?
size_t lhs_offset = 0;
if (str[0] == delimiter) {
lhs_offset = 1;
Expand Down Expand Up @@ -75,8 +75,8 @@ rcutils_split(
size_t rhs = 0 + lhs_offset;
for (; rhs < string_size - rhs_offset; ++rhs) {
if (str[rhs] == delimiter) {
// in case we have two consequetive delimiters
// we ignore these and delimish the size of the array
// in case we have two consecutive delimiters
// we ignore these and diminish the size of the array
if (rhs - lhs < 1) {
--string_array->size;
string_array->data[string_array->size] = NULL;
Expand Down Expand Up @@ -136,7 +136,7 @@ rcutils_split_last(

size_t string_size = strlen(str);

// does it start with a delmiter?
// does it start with a delimiter?
size_t lhs_offset = 0;
if (str[0] == delimiter) {
lhs_offset = 1;
Expand Down