Add source code for ctrtool

This commit is contained in:
jakcron
2022-03-12 16:00:33 +08:00
parent 6ad2f13c50
commit 800f5776bc
681 changed files with 219734 additions and 0 deletions
@@ -0,0 +1,39 @@
/**
* @file PathUtil.h
* @brief Declaration of tc::io::PathUtil
* @author Jack (jakcron)
* @version 0.2
* @date 2020/03/22
*/
#pragma once
#include <list>
#include <tc/types.h>
#include <tc/io/Path.h>
namespace tc { namespace io {
/**
* @class PathUtil
* @brief Collection of utilities related to tc::io::Path
**/
class PathUtil
{
public:
/**
* @brief Format a Path as a Windows style UTF-16 string
* @param[in] path Source Path
* @param[out] out Destination UTF-16 string
* @note See @ref tc::io::Path
**/
static void pathToWindowsUTF16(const tc::io::Path& path, std::u16string& out);
/**
* @brief Format a Path as a Unix/Linux style UTF-8 string
* @param[in] path Source Path
* @param[out] out Destination UTF-8 string
* @note See @ref tc::io::Path
**/
static void pathToUnixUTF8(const tc::io::Path& path, std::string& out);
};
}} // namespace tc::io