📅  最后修改于: 2022-03-11 14:48:02.339000             🧑  作者: Mango
static String getFirstWord(String inputString) {
List wordList = inputString.split(" ");
if (wordList.isNotEmpty) {
return wordList[0];
} else {
return ' ';
}
}