Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
suconghou committed Jun 4, 2024
1 parent 1e84f2d commit e91ddbd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion c++/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class Line

int parse_upstream_addr(char *item_value)
{
return parse_item_trim_space(item_value, digital_or_none_end);
return parse_item_trim_space(item_value, not_space);
}

int parse_upstream_status(char *item_value)
Expand Down
2 changes: 1 addition & 1 deletion c/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ int parse_bytes_sent(const char *s, int *offset, const int len, char *item_value

int parse_upstream_addr(const char *s, int *offset, const int len, char *item_value)
{
return parse_item_trim_space(s, offset, len, item_value, digital_or_none_end);
return parse_item_trim_space(s, offset, len, item_value, not_space);
}

int parse_upstream_status(const char *s, int *offset, const int len, char *item_value)
Expand Down
2 changes: 1 addition & 1 deletion main.nim
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ proc parse_bytes_sent(this: var Line): string =

# 当前是空格,上一个是-或者数字
proc parse_upstream_addr(this: var Line): string =
return this.parse_item_trim_space(digital_or_none_end)
return this.parse_item_trim_space(not_space)

# 当前是空格,上一个是-或者数字
proc parse_upstream_status(this: var Line): string =
Expand Down

0 comments on commit e91ddbd

Please sign in to comment.