<p>clean.</p>

@param text a {@link java.lang.String} object.
@return a {@link java.lang.String} object.
763331
public static String clean(String text) {
        if (text == null)
            return "";

        text = text.trim();
        text = text.replace("\"", "\\\"");
        text = text.replace("\'", "\\\'");
        text = text.replace("\n", "");
        text = text.replace("\r", "");
        return text;
    }
1036593
public T html(final String text) {
        if (TextUtils.isEmpty(text)) {
            return text("");
        }
        if (text.contains("<") && text.contains(">")) {
            if (view instanceof TextView)
                ((TextView)view).setMovementMethod(LinkMovementMethod.getInstance());
            return text(Html.fromHtml(text));

        } else {
            return text(text);
        }
    }
350223
public static List<String> splitCommaSeparatedList(String text) {
    if (text == null || text.isEmpty()) {
      return Collections.emptyList();
    }
    Matcher matcher = pattern.matcher(text);
    List<String> parts = new ArrayList<String>();
    while(matcher.find()) {
      parts.add(matcher.group().trim());
    }
    return parts;
  }
1235275
private String cleanUpString(String text) {
    if (StringUtils.isEmpty(text)) {
      return text;
    }
    else {
      return CONTROL_CHARS.matcher(text).replaceAll("");
    }
  }
422064
public SelectStep text(String text) {
		return new SelectStep(element, text, SelectStep.OptionSelectorType.TEXT);
	}
221527
public T text(CharSequence text) {

        if (view instanceof TextView) {
            TextView tv = (TextView) view;
            tv.setText(text);
        }

        return self();
    }
568097
public static String deleteExcededSpaces(String text) {
        int size = text.length();
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < size; i++) {
            char ch = text.charAt(i);
            if (ch == ' ') {
               if (i > 0) {
                   char ch2 = text.charAt(i-1);
                   if ((ch2 != ' ') && (i < size-1) && (!text.substring(i+1).trim().equals(""))) {
                       sb.append(ch);
                   }
               }
            } else {
               sb.append(ch);
            }
        }
        
        return sb.toString();
    }
1358365
public TextMatchBinding setText(
                    final Collection<String> text
                    )
    {
        if (text == null  ||  text.size() == 0) {
            clearText();
            return this;
        }

        synchronized (text) {
            for (String  pattern : text) {
                if (pattern == null  ||  pattern.length() == 0) {
                    throw new IllegalArgumentException( "null element" );
                }
            }

            clearText();
            for (String  pattern : text) {
                addText( pattern );
            }
        }

        return this;
    }
466337
def clean_text(text):
    """"""
    # Replace a few nasty unicode characters with their ASCII equivalent
    maps = {u'×': u'x', u'–': u'-', u'−': '-'}
    for element in maps:
        text = text.replace(element, maps[element])

    # Replace genitives
    text = re.sub(r'(?<=\w)\'s\b|(?<=\w)s\'(?!\w)', '  ', text)

    logging.debug(u'Clean text: "%s"', text)

    return text
1098055
public static String trimAndNullIfEmpty(final String text) {
        if (text != null && !text.trim().isEmpty()) {
            return text.trim();
        }
        return null;
    }
858323
public String replace(CharSequence text)
    {
        if (text == null)
        {
            return null;
        }
        try
        {
            StringBuilder sb = new StringBuilder();
            replace(text, sb);
            return sb.toString();
        }
        catch (IOException ex)
        {
            throw new IllegalArgumentException();
        }
    }
403826
public CAS process(String text) {
        CAS cas = retrieve();
        if (cas == null)
            return null;

        cas.setDocumentText(text);
        try {
            analysisEngine.process(cas);
        } catch (AnalysisEngineProcessException e) {
            log.warn("Unable to process text " + text, e);
        }

        return cas;


    }
1132628
public static function clearText(string $text = null) : string
    {
        if (is_null($text)){
            return '';
        }
        return strip_tags(trim($text));
    }
952532
public String replace(final String text) {
        
        if(Utils.isEmpty(text)) {
            return text;
        }
        
        final int length = text.length();
        StringBuilder replaced = new StringBuilder();
        int index = 0;
        
        while(index < length) {
            int multiIndex = replaceMulti(text, index, replaced);
            if(multiIndex > index) {
                index = multiIndex;
                continue;
            }
            
            int singleIndex = replaceSingle(text, index, replaced);
            if(singleIndex > index) {
                index = singleIndex;
                continue;
            }
            
            // 置換できるものがない場合
            replaced.append(text.charAt(index));
            index++;
            
        }
        
        return replaced.toString();
    }
336134
public static boolean hasText(final String text) {
		if (text != null && !"".equals(text.trim())) {
			return true;
		}
		return false;
	}
1157365
public <V> V convertFrom(final char[] text) {
        if (text == null) return null;
        return (V) convertFrom(text, 0, text.length);
    }
64058
public static Condition exactText(final String text) {
    return new Condition("exact text") {
      @Override
      public boolean apply(Driver driver, WebElement element) {
        return Html.text.equals(element.getText(), text);
      }

      @Override
      public String toString() {
        return name + " '" + text + '\'';
      }
    };
  }