Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String setStringNotNull(String stringRes) {
        if (stringRes == null || stringRes.isEmpty()) {
            return "";
        }

        //Convert Non_breaking (ASCI 160) to Simple Space. trim() does'nt handle it.
        stringRes = stringRes.replace(String.valueOf((char) 160), " ");

        String tempString = stringRes.trim();
        return tempString;
    }
}