什么是stringTokenizer [英] what is stringTokenizer

查看:74
本文介绍了什么是stringTokenizer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能解释什么是stringTokenizer?

解决方案

令牌化是您根据字符拆分字符串的过程.您可能要分割逗号.您将字符串传递给令牌生成器,并以,"作为分隔符.然后,当您从令牌生成器中读取每个项目时,它们将根据分隔符进行拆分.我见过的一种常见方法是阅读直播.令牌生成器在换行时拆分流,然后使用另一个令牌生成器将每行拆分在逗号或制表符上.


尝试一下:

在Java中使用StringTokenizer

StringTokenizer类


Can anyone explain what is stringTokenizer?

解决方案

Tokenizing is the process were you split up a string based on a character. You may want to split on the comma. You pass the string through the tokenizer giving '','' as the separator. Then as you read each item out of the tokenizer they are split up based on the separator. A common approach I have seen is reading a live stream. A tokenizer splits the stream on linefeed and then each line is split on commas or tabs using another tokenizer.


Try this :

Using StringTokenizer in Java

Class StringTokenizer


这篇关于什么是stringTokenizer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆