Home
last modified time | relevance | path

Searched refs:dir_string (Results 1 – 2 of 2) sorted by relevance

/third_party/gn/src/gn/
Dninja_build_writer.cc513 const std::string& dir_string = label.dir().value(); local
514 if (dir_string.size() == 2 && dir_string[0] == '/' &&
515 dir_string[1] == '/') {
517 } else if (dir_string.size() == label.name().size() + 3 && // Size matches.
518 dir_string[0] == '/' &&
519 dir_string[1] == '/' && // "//" at beginning.
520 dir_string[dir_string.size() - 1] == '/' && // "/" at end.
521 dir_string.compare(2, label.name().size(), label.name()) == 0) {
Dfilesystem_utils.cc297 const std::string& dir_string = dir.value(); in FindLastDirComponent() local
299 if (dir_string.empty()) in FindLastDirComponent()
301 int cur = static_cast<int>(dir_string.size()) - 1; in FindLastDirComponent()
302 DCHECK(dir_string[cur] == '/'); in FindLastDirComponent()
307 if (dir_string[cur] == '/') in FindLastDirComponent()
308 return std::string_view(&dir_string[cur + 1], end - cur - 1); in FindLastDirComponent()
310 return std::string_view(&dir_string[0], end); in FindLastDirComponent()