StringUtilsTrial.java Source code

Java tutorial

Introduction

Here is the source code for StringUtilsTrial.java

Source

/*
13) Strip whitespace >>>ABCD
    
 */

import org.apache.commons.lang.StringUtils;

public class StringUtilsTrial {
    public static void main(String[] args) {

        // Strip whitespace from start and end of the string.
        // If null returns empty string
        System.out.println("13) Strip whitespace >>>" + StringUtils.stripToEmpty("     ABCD      "));

    }
}