mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
LibCore: Use new format functions in some places.
This commit is contained in:
parent
43e37c7cde
commit
c9ca897a45
7 changed files with 63 additions and 61 deletions
|
@ -96,7 +96,7 @@ String DirIterator::next_path()
|
|||
|
||||
String DirIterator::next_full_path()
|
||||
{
|
||||
return String::format("%s/%s", m_path.characters(), next_path().characters());
|
||||
return String::formatted("{}/{}", m_path, next_path());
|
||||
}
|
||||
|
||||
String find_executable_in_path(String filename)
|
||||
|
@ -109,7 +109,7 @@ String find_executable_in_path(String filename)
|
|||
}
|
||||
|
||||
for (auto directory : String { getenv("PATH") }.split(':')) {
|
||||
auto fullpath = String::format("%s/%s", directory.characters(), filename.characters());
|
||||
auto fullpath = String::formatted("{}/{}", directory, filename);
|
||||
|
||||
if (access(fullpath.characters(), X_OK) == 0)
|
||||
return fullpath;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue