Package org.apache.jorphan.util

# Class StringWrap

java.lang.Object
org.apache.jorphan.util.StringWrap

@API(since="5.5", status=EXPERIMENTAL) public class StringWrap extends Object
Wraps text in such a way so the lines do not exceed given maximum length.

## Constructor Summary

Constructors
Constructor
Description
`StringWrap(int minWrap, int maxWrap)`
Creates string wrapper instance.

## Method Summary

Modifier and Type
Method
Description
`int`
`getMaxWrap()`
`int`
`getMinWrap()`
`String`
`wrap(String input, String delimiter)`
Wraps given `input` text accoding to

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### StringWrap

public StringWrap(int minWrap, int maxWrap)
Creates string wrapper instance.

Parameters:
  `minWrap` - minimal word length for the wrap
  `maxWrap` - maximum word length for the wrap

## Method Details

### getMinWrap

public int getMinWrap()

### getMaxWrap

public int getMaxWrap()

### wrap

public String wrap(String input, String delimiter)
Wraps given `input` text accoding to

Parameters:
  `input` - input text
  `delimiter` - delimiter when inserting soft wraps
Returns:
  modified text with added soft wraps, or input if wraps are not needed