Java String Wrap wrapText(String description)

Here you can find the source of wrapText(String description)

Description

wrap Text

License

Open Source License

Declaration

private static List<String> wrapText(String description) 

Method Source Code

//package com.java2s;
/*// w w w  . j a  v a 2s.  com
 // This software is subject to the terms of the Eclipse Public License v1.0
 // Agreement, available at the following URL:
 // http://www.eclipse.org/legal/epl-v10.html.
 // You must accept the terms of that agreement to use this software.
 //
 // Copyright (C) 2011-2011 Pentaho
 // All Rights Reserved.
 */

import java.util.*;

public class Main {
    private static List<String> wrapText(String description) {
        description = description.trim();
        return Arrays.asList(description.split("\n"));
    }
}

Related

  1. wordWrap(final String rawString, final int lineLength)
  2. wordWrap(String entry)
  3. wordWrap(String input, int width)
  4. wrapString(String str)
  5. wrapString(String text, int maxLength)
  6. wrapText(String inString, String newline, int wrapColumn)
  7. wrapText(String line, int maxLineLength)
  8. wrapText(String text, int len)
  9. wrapText(String text, int len, boolean wordWrap)