I've written some code which utilizes the split() method to return the first item delimited by periods. After a little testing I found that the array I split the string into has a length of 0 so I assume it's not splitting at all. It may be relevant that in some cases there is no period and I want the entire string returned. To compensate for this, I added a period onto the end of each String. See below:
longText=longText+".";
String tempName[]=longText.split(".");
String realName=tempName[0];
System.out.println(realName);
return realName;