コード例 #1
0
ファイル: shell_escape.hpp プロジェクト: SlyryD/carmel
inline std::basic_ostream<Ch, Tr> & out_shell_quote(std::basic_ostream<Ch, Tr> &out, const C& data, bool quote_empty=true) {
  out_stream<Ch, Tr> chars(out);
  shell_quote_chars(chars, to_string(data), quote_empty);
  return out;
}
コード例 #2
0
ファイル: shell_escape.hpp プロジェクト: SlyryD/carmel
inline std::string shell_quote(const C& data, bool quote_empty=true) {
  string_builder b;
  return shell_quote_chars(append_string_builder(b), to_string(data), quote_empty).str();
}
コード例 #3
0
ファイル: shell_escape.hpp プロジェクト: anibalanto/hyp
inline std::string shell_quote(C const& data, bool quote_empty = true) {
  string_buffer b;  // NRVO in C++11
  shell_quote_chars(append_string_buffer(b), to_string(data), quote_empty);
  return strcopy(b);
}