File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -179,18 +179,18 @@ int laco_is_match(const char** matches, const char* test_string) {
179179 return false;
180180}
181181
182- char * * laco_line_to_words ( char * line ) {
183- if (line == NULL ) return NULL ;
182+ char * * laco_split_by ( const char * split_with , char * string ) {
183+ if (string == NULL ) return NULL ;
184184
185185 char * * result = calloc (16 , sizeof (char * ));
186186 size_t i = 0 ;
187187
188188 while (1 ) {
189- result [i ] = strsep (& line , " " );
189+ result [i ] = strsep (& string , split_with );
190190
191191 if (result [i ] == NULL ) break ;
192192
193- ignore_extra_spaces (& line );
193+ ignore_extra_spaces (& string );
194194
195195 i += 1 ;
196196 }
Original file line number Diff line number Diff line change @@ -42,6 +42,6 @@ int laco_is_match(const char** matches, const char* test_string);
4242 * Takes a line, seperated by spaces, and changes it into an array of the
4343 * words that make up the line. The last value of this array will be NULL.
4444 */
45- char * * laco_line_to_words ( char * line );
45+ char * * laco_split_by ( const char * split_with , char * string );
4646
4747#endif /* LACO_UTIL_H */
You can’t perform that action at this time.
0 commit comments