-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace std::string with a custom string class (#56)
* replace std::string with a custom string class * remove unnecessary include guard * fix a bug where sometimes tuw can't redirect stdout on linux
- Loading branch information
1 parent
4dce86c
commit cb6c81b
Showing
20 changed files
with
948 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#pragma once | ||
#include <string> | ||
#include "string_utils.h" | ||
|
||
struct ExecuteResult { | ||
int exit_code; | ||
std::string err_msg; | ||
std::string last_line; | ||
tuwString err_msg; | ||
tuwString last_line; | ||
}; | ||
|
||
// When use_utf8_on_windows is true, | ||
// Tuw converts output strings from UTF-8 to UTF-16 on Windows. | ||
ExecuteResult Execute(const std::string& cmd, bool use_utf8_on_windows = false); | ||
ExecuteResult LaunchDefaultApp(const std::string& url); | ||
ExecuteResult Execute(const tuwString& cmd, bool use_utf8_on_windows = false); | ||
ExecuteResult LaunchDefaultApp(const tuwString& url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.