Here you can find the source of cleanString(String field)
Parameter | Description |
---|---|
field | a parameter |
public static String cleanString(String field)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w ww . j av a 2 s . c om*/ * @param field * @return new string */ public static String cleanString(String field) { if (field == null) return null; String cleanString = field.trim(); if (cleanString.equalsIgnoreCase("")) return null; if (cleanString.equalsIgnoreCase("NULL")) return null; if (cleanString != null && cleanString.length() == 0) return null; return cleanString; } }