Go to the source code of this file.
|
| mlpack |
| Linear algebra utility functions, generally performed on matrices or vectors.
|
|
|
std::string | mlpack::util::HyphenateString (const std::string &str, const std::string &prefix, const bool force=false) |
| Hyphenate a string or split it onto multiple 80-character lines, with some amount of padding on each line. More...
|
|
std::string | mlpack::util::HyphenateString (const std::string &str, int padding) |
| Hyphenate a string or split it onto multiple 80-character lines, with some amount of padding on each line. More...
|
|
- Author
- Ryan Curtin
Hyphenate a string.
mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.
◆ HyphenateString() [1/2]
std::string mlpack::util::HyphenateString |
( |
const std::string & |
str, |
|
|
const std::string & |
prefix, |
|
|
const bool |
force = false |
|
) |
| |
|
inline |
Hyphenate a string or split it onto multiple 80-character lines, with some amount of padding on each line.
This is used for option output.
- Parameters
-
str | String to hyphenate (splits are on ' '). |
prefix | Prefix to hyphenate a string with. |
force | Hyphenate the string even if the length is less then 80. |
- Exceptions
-
std::invalid_argument | if prefix.size() >= 80. |
◆ HyphenateString() [2/2]
std::string mlpack::util::HyphenateString |
( |
const std::string & |
str, |
|
|
int |
padding |
|
) |
| |
|
inline |
Hyphenate a string or split it onto multiple 80-character lines, with some amount of padding on each line.
This is used for option output.
- Parameters
-
str | String to hyphenate (splits are on ' '). |
padding | Amount of padding on the left for each new line. |