+namespace {
+
+string envName(Spacing::Space space, bool useSetSpace)
+{
+ static char const * const env_names[]
+ = { "SingleSpace", "OnehalfSpace", "DoubleSpace", "Spacing", ""};
+ string const name = env_names[space];
+
+ return useSetSpace ? name : support::ascii_lowercase(name);
+}
+
+string cmdName(Spacing::Space space, bool useSetSpace)
+{
+ static char const * const cmd_names[]
+ = { "SingleSpacing", "OnehalfSpacing", "DoubleSpacing", "SetStretch", ""};
+ string const name = cmd_names[space];
+
+ if (useSetSpace && name == "SetStretch")
+ return "setSpacing";
+
+ return useSetSpace ? name : support::ascii_lowercase(name);
+}
+
+} // namespace
+