Replace some [BR] in help texts with rst literals
[alexxy/gromacs.git] / src / gromacs / utility / stringutil.h
index e74d6c990532d0224f000322e9c0306daa9e4bf6..e7e11a6d9ef5c9bf5d1d3a04a7a7dd22add7df77 100644 (file)
@@ -244,34 +244,19 @@ std::string joinStrings(const ContainerType &container, const char *separator)
 }
 
 /*! \brief
- * Joins strings in an array to a single string.
+ * Joins strings from an array with a separator in between.
  *
- * \param[in] sarray  Array of strings to concatenate.
- * \param[in] count   Number of elements in \p sarray to concatenate.
- * \returns   All strings in \p sarray joined, ensuring at least one space
- *      between the strings.
- * \throws    std::bad_alloc if out of memory.
- *
- * The strings in the \p sarray array are concatenated, adding a single space
- * between the strings if there is no whitespace in the end of a string.
- * Terminal whitespace is removed.
- */
-std::string concatenateStrings(const char * const *sarray, size_t count);
-/*! \brief
- * Convenience overload for joining strings in a C array (static data).
- *
- * \param[in] sarray  Array of strings to concatenate.
- * \tparam    count   Deduced number of elements in \p sarray.
- * \returns   All strings in \p sarray joined, ensuring at least one space
- *      between the strings.
+ * \param[in] array      Array of strings to join.
+ * \param[in] separator  String to put in between the joined strings.
+ * \tparam    count      Deduced number of elements in \p array.
+ * \returns   All strings from `aray` concatenated with `separator`
+ *     between each pair.
  * \throws    std::bad_alloc if out of memory.
- *
- * \see concatenateStrings(const char * const *, size_t)
  */
 template <size_t count>
-std::string concatenateStrings(const char * const (&sarray)[count])
+std::string joinStrings(const char *const (&array)[count], const char *separator)
 {
-    return concatenateStrings(sarray, count);
+    return joinStrings(array, array + count, separator);
 }
 
 /*! \brief
@@ -387,7 +372,7 @@ class TextLineWrapperSettings
          *
          * If not removed, the space is added to the indentation set with
          * setIndent().
-         * The default is to strip such whitespace.
+         * The default is to not strip such whitespace.
          */
         void setStripLeadingWhitespace(bool bStrip)
         {