开发者

how to split the data from sqlite. i need to separate data by each sentence(means split by .)

    String subTopicsArray [] = detail.split("\\. ");
    StringBuffer splitTopic开发者_StackOverflows = new StringBuffer();

    for(int i=0; i<subTopicsArray.length; i++){     
        String abc=subTopicsArray[i].trim();
        if (abc.length() > 0)
        {
        splitTopics.append(i+1+") "+subTopicsArray[i].trim()+"."+"\n" );
        splitTopics.append("\n");
        }

Am using this but am getting two dots for last sentence


use StringTokenizer with deliminator "."

For Example:

StringTokenizer st  = new StringTokenizer(detail);
while(st.hasMoreTokens())
{
   st.nextToken();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜