SPARK
0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
String.h
1
#pragma once
2
3
#include <span>
4
#include <string>
5
6
namespace
spark::lib
7
{
14
[[nodiscard]]
constexpr
std::string join(
const
std::span<std::string> strings,
const
std::string& separator =
""
) noexcept
15
{
16
if
(strings.empty())
17
return
""
;
18
19
std::string result = strings[0];
20
for
(std::size_t i = 1; i < strings.size(); ++i)
21
result += separator + strings[i];
22
return
result;
23
}
24
}
sources
spark
lib
include
spark
lib
String.h
Generated by
1.11.0