Android String Split getFirstWord(String str)

Here you can find the source of getFirstWord(String str)

Description

get First Word

Declaration

public static String getFirstWord(String str) 

Method Source Code

//package com.java2s;

public class Main {
    public final static String SPACE = " ";

    public static String getFirstWord(String str) {
        return str.split(SPACE)[0];
    }//from w w  w .  ja  v a 2s  .  c o  m
}

Related

  1. splitInts(String str)
  2. splitLast(String target, String pattern)
  3. splitSteps(String str, String split)
  4. splitString(String tokenedStr, String token)
  5. explode(String original, String split)
  6. getLine(String text, int line)
  7. stringToLongArray(String src, String separator)
  8. strToArray(String string)
  9. strToArray(String string, String delim)