Skip to content

Commit

Permalink
Update the documentation for the optional parameters feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mertyildiran committed Jul 23, 2020
1 parent 3dbcbba commit ca18169
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ kaos> string.concat("hello", " world")
hello world
```

### list string.split(str s, str delimiter)
### list string.split(str s, str delimiter = ' ')

Splits the string `s` into a list according to the string `delimiter`.

Expand All @@ -58,7 +58,7 @@ kaos> string.split("A quick brown fox jumps over the lazy dog", " ")
['A', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']
```

### str string.join(list words, str separator)
### str string.join(list words, str separator = ' ')

Concatenates a list of strings `words` into a string by separating them with string `separator`.

Expand Down
4 changes: 2 additions & 2 deletions string.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int KAOS_EXPORT Kaos_concat()
return 0;
}

// str string.split(str s, str delimiter)
// list string.split(str s, str delimiter = ' ')

char *split_params_name[] = {
"s",
Expand Down Expand Up @@ -148,7 +148,7 @@ int KAOS_EXPORT Kaos_split()
return 0;
}

// list string.join(list words, str delimiter)
// str string.join(list words, str separator = ' ')

char *join_params_name[] = {
"words",
Expand Down

0 comments on commit ca18169

Please sign in to comment.