MCPcopy Create free account
hub / github.com/a2flo/floor / make_concat_array

Method make_concat_array

include/floor/constexpr/const_string.hpp:213–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211 //! creates a storage array from two c strings
212 //! (note that len_0 should have been subtracted by 1 beforehand, so that the \0 of the first string isn't copied)
213 template <size_t n> static constexpr storage_array<n> make_concat_array(const size_t len_0, const size_t len_1,
214 const char* str_0, const char* str_1) {
215 storage_array<n> ret {};
216 size_t i = 0;
217 for(; i < len_0; ++i) {
218 ret.data[i] = str_0[i];
219 }
220 for(size_t j = 0; j < len_1; ++j, ++i) {
221 ret.data[i] = str_1[j];
222 }
223 return ret;
224 }
225
226 //! hash computation helper function
227 static constexpr uint32_t rotl32(uint32_t x, int r) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected