folly::makeFixedString

** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** Construct a BasicFixedString object from a null-terminated array of characters. The capacity and size of the string will be equal to one less than the size of the array.

Synopsis

Declared in <folly/FixedString.h>

template<
    class Char,
    std::size_t N>
constexpr
BasicFixedString<Char, N - 1U>
makeFixedString(Char const(& a)[]) noexcept;

Return Value

A BasicFixedString holding the characters of a.

Parameters

NameDescription
aThe null-terminated array of characters to build the string from.

Preconditions

  • a contains no embedded null characters.
  • a[N-1]== Char(0)

Postconditions

  • For a returned string s, s[i]==a[i] for every i in [0,N-1].