MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / looks_like_posix_option

Function looks_like_posix_option

Tools/Support/PortableMSVCWrapper.py:36–54  ·  view source on GitHub ↗
(argument: str)

Source from the content-addressed store, hash-verified

34
35
36def looks_like_posix_option(argument: str):
37 if not argument.startswith("/") or looks_like_windows_path(argument):
38 return False
39
40 first_value_separator = len(argument)
41 for separator in (":", "="):
42 index = argument.find(separator, 1)
43 if index != -1 and index < first_value_separator:
44 first_value_separator = index
45
46 first_path_separator = len(argument)
47 for separator in ("/", "\\"):
48 index = argument.find(separator, 1)
49 if index != -1 and index < first_path_separator:
50 first_path_separator = index
51
52 if first_value_separator < first_path_separator:
53 return True
54 return first_path_separator == len(argument)
55
56
57def convert_response_file(response_path: Path):

Callers 1

convert_argumentFunction · 0.85

Calls 2

looks_like_windows_pathFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected