mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 21:38:40 +00:00
helpers for matching string literals
This commit is contained in:
@@ -135,8 +135,8 @@ lnk_cmd_line_parse_windows_rules(Arena *arena, String8List arg_list)
|
||||
|
||||
for (String8Node *arg_node = arg_list.first; arg_node != 0; arg_node = arg_node->next) {
|
||||
String8 arg = arg_node->string;
|
||||
B32 is_option = str8_match(str8_lit("/"), arg, StringMatchFlag_RightSideSloppy) ||
|
||||
str8_match(str8_lit("-"), arg, StringMatchFlag_RightSideSloppy);
|
||||
B32 is_option = str8_match_lit("/", arg, StringMatchFlag_RightSideSloppy) ||
|
||||
str8_match_lit("-", arg, StringMatchFlag_RightSideSloppy);
|
||||
if (is_option) {
|
||||
U64 param_start_pos = str8_find_needle(arg, 0, str8_lit(":"), 0);
|
||||
String8 option_name = str8_chop(arg, arg.size - param_start_pos);
|
||||
@@ -195,7 +195,7 @@ lnk_unwrap_rsp(Arena *arena, String8List arg_list)
|
||||
String8List result = {0};
|
||||
|
||||
for (String8Node *curr = arg_list.first; curr != 0; curr = curr->next) {
|
||||
B32 is_rsp = str8_match(str8_lit("@"), curr->string, StringMatchFlag_RightSideSloppy);
|
||||
B32 is_rsp = str8_match_lit("@", curr->string, StringMatchFlag_RightSideSloppy);
|
||||
if (is_rsp) {
|
||||
// remove "@"
|
||||
String8 name = str8_skip(curr->string, 1);
|
||||
|
||||
Reference in New Issue
Block a user