|
lipsum-cpp 0.5.4
A basic library written in C++ for generating placeholder Lorem Ipsum text.
|
This is the main namespace of lipsum-cpp. More...
Namespaces | |
| namespace | internal |
| This namespace contains functions only used internally by other functions. | |
Classes | |
| struct | ArgVec2 |
| Store data for inputting into functions. More... | |
| class | Source |
| Class for multi-source generation. More... | |
| class | Generator |
| Main class of lipsum-cpp. More... | |
| struct | GeneratorSettings |
| Settings for lipsum::Generator. More... | |
Enumerations | |
| enum | GeneratorFlags : bool { USELIPSUM = true , NO_USELIPSUM = false , HTML = true , MARKDOWN = false , OBJECT = true , ARRAY = false , BOLD = true , ITALIC = false , ORDERED = true , UNORDERED = false , IPV4 = false , IPV6 = true , NOPORT = false , PORT = true } |
| Flags for lipsum-cpp. More... | |
| enum class | CaseSlugCase : int { CamelCase = 0 , PascalCase , SnakeCase , ShoutyCase , KebabCase , TrainCase } |
| Cases used by lipsum::Generator::case_slug(). More... | |
| enum class | CodeLanguage : int { Cpp = 0 , Python , Rust , C , JavaScript } |
| Languages used by lipsum::Generator::code(). More... | |
| enum class | Format : int { Plain = 0 , Markdown , HTML , JSON , XML } |
| Types of formats. More... | |
Functions | |
| LIPSUM_API std::string | GenerateDefaultLipsumSentence () |
| Generate the beginning Lorem Ipsum sentence. | |
| LIPSUM_API int | CountWords (const std::string &str) |
| Count the number of words in a string. | |
| LIPSUM_API int | CountSentenceFragments (const std::string &str) |
| Count the number of sentence fragments in a string. | |
| LIPSUM_API int | CountSentences (const std::string &str) |
| Count the number of sentences in a string. | |
| LIPSUM_API int | CountParagraphs (const std::string &str, Format format=Format::Plain) |
| Count the number of paragraphs or elements in a string. | |
| LIPSUM_API std::string | ConvertFormat (const std::string &str, Format format1=Format::Plain, Format format2=Format::HTML) |
| Convert a string between two formats. | |
This is the main namespace of lipsum-cpp.
This namespace contains all the code for the C++ usage of lipsum-cpp.
|
strong |
Cases used by lipsum::Generator::case_slug().
Types of cases used by lipsum::Generator::case_slug(). Includes various types such as camel case, snake case, etc.
|
strong |
Languages used by lipsum::Generator::code().
Programming languages that lipsum::Generator::code() can generate, such as C++ and Python.
|
strong |
Types of formats.
Types of formats used in lipsum::CountParagraphs() and lipsum::ConvertFormat(). In lipsum::CountParagraphs(), Plain is counting plain text, Markdown is counting Markdown or HTML, and HTML is counting HTML explicitly. Formerly known as CountParaMethod.
| enum lipsum::GeneratorFlags : bool |
Flags for lipsum-cpp.
This stores various flags for convenience.
| std::string lipsum::ConvertFormat | ( | const std::string & | str, |
| Format | format1 = Format::Plain, | ||
| Format | format2 = Format::HTML ) |
Convert a string between two formats.
Attempt a conversion of a string between the two specified formats.
| str | The string inputted. |
| format1 | The string's format. By default plain text. |
| format2 | The destination format. By default HTML. |
| int lipsum::CountParagraphs | ( | const std::string & | str, |
| Format | format = Format::Plain ) |
Count the number of paragraphs or elements in a string.
Count the number of tab characters in a non-formatted string, double newlines in Markdown/HTML strings, and elements in HTML strings.
| str | The string inputted. |
| format | The format the string is in. By default non-formatted. |
| int lipsum::CountSentenceFragments | ( | const std::string & | str | ) |
Count the number of sentence fragments in a string.
Count the number of commas, semicolons, hyphens, and colons in a string, excluding usage in Markdown. (i.e. hyphen at start of line, or in parentheses)
| str | The string inputted. |
| int lipsum::CountSentences | ( | const std::string & | str | ) |
Count the number of sentences in a string.
Count the number of periods, exclamation marks, and question marks in a string, ignoring usage in Markdown URLs. (i.e. in parentheses)
| str | The string inputted. |
| int lipsum::CountWords | ( | const std::string & | str | ) |
Count the number of words in a string.
Count the number of words in a string using alphanumeric characters, hyphens, plus-signs, and apostrophes, excluding words within parentheses.
| str | The string inputted. |
| std::string lipsum::GenerateDefaultLipsumSentence | ( | ) |
Generate the beginning Lorem Ipsum sentence.
Returns the sentence "Lorem ipsum dolor sit amet, consectetur adipiscing elit."