Example usage for org.apache.commons.lang3 StringUtils CR

List of usage examples for org.apache.commons.lang3 StringUtils CR

Introduction

In this page you can find the example usage for org.apache.commons.lang3 StringUtils CR.

Prototype

String CR

To view the source code for org.apache.commons.lang3 StringUtils CR.

Click Source Link

Document

A String for carriage return CR ("\r").

Usage

From source file:de.vandermeer.asciiparagraph.Test_CodeForDocs.java

@Test
 public void test_WsBehavior() {
     this.output("whitespace behavior");

     AsciiParagraph ap = new AsciiParagraph();

     ap.addText("c2  c2");
     ap.addText("c3   c3");
     ap.addText("c4    c4");
     ap.addText("c5     c5");
     ap.addText("c6      c6");
     ap.addText("c7       c7");

     ap.addText("t2      t2");
     ap.addText("t3         t3");
     ap.addText("t4            t4");
     ap.addText("t5               t5");
     ap.addText("t6                  t6");
     ap.addText("t7                     t7");

     ap.addText("word followed by " + StringUtils.CR + " followed by" + StringUtils.LF + " followed by \n");

     ap.getContext().setWidth(60);//w  w  w.  j  a va 2 s .co m
     ap.getContext().setAlignment(TextAlign.LEFT);
     System.out.println(ap.render());

     this.output();
 }