Package org.cyclops.cyclopscore.helper
Class StringHelpers
java.lang.Object
org.cyclops.cyclopscore.helper.StringHelpers
A collection of String helper methods.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionsplitLines
(String input, int maxLength, String prefix) Split the input string into lines while preserving the full words.
-
Constructor Details
-
StringHelpers
public StringHelpers()
-
-
Method Details
-
splitLines
Split the input string into lines while preserving the full words. This will also forcefully add newlines when '\n' is found in the input string.- Parameters:
input
- The input sentence.maxLength
- The maximum length of a line.prefix
- A prefix to add to each produced line. This will not increase the character count per line.- Returns:
- The sentence split into lines.
-