Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » How to split a sentence into words
How to split a sentence into words [message #29773] Tue, 16 November 2010 08:22 Go to previous message
o_wild is currently offline  o_wild
Messages: 28
Registered: December 2008
Location: Urmqi
Promising Member

Hi, everybody. I can find built-in split functions in other languages or platforms, see below.
// a java program that split a sentence into words
import java.util.Scanner;

public class StringBufferedTest {
 public static void main(String[] args) {
  Scanner sc=new Scanner(System.in);
  System.out.print("Please Input a sentence: ");
  String sent=sc.nextLine();  
  String str[]=sent.split(" ");  
  for(int i=0;i<str.length;i++){
   System.out.println(str[i]);
  }
 }
}
But in U++, i haven't found the same function yet. How can i implement this function?

[Updated on: Tue, 16 November 2010 08:58] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error in OLE?
Next Topic: [bug report]problem about processing WM_PAINT message
Goto Forum:
  


Current Time: Wed Oct 23 00:16:22 CEST 2019

Total time taken to generate the page: 0.00846 seconds