Class TextUtils
java.lang.Object
org.eclipse.jetty.websocket.core.util.TextUtils
Collection of utility methods for Text content
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic StringCreate a hint of what the text is like.static StringmaxStringLength(int max, String raw) Smash a long string to fit within the max string length, by taking the middle section of the string and replacing them with an ellipsis "..."static StringCreate a hint of what the text is like. 
- 
Constructor Details
- 
TextUtils
public TextUtils() 
 - 
 - 
Method Details
- 
quote
 - 
hint
 - 
maxStringLength
Smash a long string to fit within the max string length, by taking the middle section of the string and replacing them with an ellipsis "..."Examples: .maxStringLength( 9, "Eatagramovabits") == "Eat...its" .maxStringLength(10, "Eatagramovabits") == "Eat...bits" .maxStringLength(11, "Eatagramovabits") == "Eata...bits"
- Parameters:
 max- the maximum size of the string (minimum size supported is 9)raw- the raw string to smash- Returns:
 - the ellipsis'd version of the string.
 
 
 -