Skip to content

Commit

Permalink
w5
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Apr 2, 2024
1 parent 3caa622 commit 5d9e816
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions dart/common/Stopwatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,19 @@ class Stopwatch final
DART_API void tic();

/// Returns the elapsed time in seconds since the last tic() call.
DART_API [[nodiscard]] double toc(bool print = false);
[[nodiscard]] DART_API double toc(bool print = false);

/// Returns the elapsed time in seconds since the last tic() call.
DART_API [[nodiscard]] double tocS(bool print = false);
[[nodiscard]] DART_API double tocS(bool print = false);

/// Returns the elapsed time in milliseconds since the last tic() call.
DART_API [[nodiscard]] double tocMS(bool print = false);
[[nodiscard]] DART_API double tocMS(bool print = false);

/// Returns the elapsed time in microseconds since the last tic() call.
DART_API [[nodiscard]] double tocUS(bool print = false);
[[nodiscard]] DART_API double tocUS(bool print = false);

/// Returns the elapsed time in nanoseconds since the last tic() call.
DART_API [[nodiscard]] double tocNS(bool print = false);
[[nodiscard]] DART_API double tocNS(bool print = false);

using StopwatchS = Stopwatch<std::chrono::seconds>;
using StopwatchMS = Stopwatch<std::chrono::milliseconds>;
Expand Down
12 changes: 6 additions & 6 deletions dart/common/String.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,31 @@
namespace dart::common {

/// Converts string to upper cases
DART_API [[nodiscard]] std::string toUpper(std::string str);
[[nodiscard]] DART_API std::string toUpper(std::string str);

/// Converts string to upper cases in place
DART_API void toUpperInPlace(std::string& str);

/// Converts string to lower cases
DART_API [[nodiscard]] std::string toLower(std::string str);
[[nodiscard]] DART_API std::string toLower(std::string str);

/// Converts string to lower cases in place
DART_API void toLowerInPlace(std::string& str);

/// Trims both sides of string
DART_API [[nodiscard]] std::string trim(
[[nodiscard]] DART_API std::string trim(
const std::string& str, const std::string& whitespaces = " \n\r\t");

/// Trims left side of string
DART_API [[nodiscard]] std::string trimLeft(
[[nodiscard]] DART_API std::string trimLeft(
const std::string& str, const std::string& whitespaces = " \n\r\t");

/// Trims right side of string
DART_API [[nodiscard]] std::string trimRight(
[[nodiscard]] DART_API std::string trimRight(
const std::string& str, const std::string& whitespaces = " \n\r\t");

/// Splits string given delimiters
DART_API [[nodiscard]] std::vector<std::string> split(
[[nodiscard]] DART_API std::vector<std::string> split(
const std::string& str, const std::string& delimiters = " \n\r\t");

} // namespace dart::common
Expand Down

0 comments on commit 5d9e816

Please sign in to comment.