58. Length of Last Word
2016-02-26 00:02
281 查看
public class Solution {
public int lengthOfLastWord(String s) {
return s.trim().length()-s.trim().lastIndexOf(" ")-1;
}
}
public int lengthOfLastWord(String s) {
return s.trim().length()-s.trim().lastIndexOf(" ")-1;
}
}
相关文章推荐
- 支付宝福卡破解——咻一咻的ui怎么实现
- 2.7.2 Android版本对应API Level
- Android 语音识别+语音搜索源码 Voice Search
- 四、Java 安装
- TimeUnit 初探
- UIView(包括子类)的几个初始化时执行动作的时机
- 创建安卓应用的 30 个经验教训
- 设计模式
- React动画实践
- 3DTouch使用
- 怎么实现iMindMap Android中导图背景的设置
- ubuntu更新git版本
- javascript Math对象方法
- 如何使用 volatile, synchronized, final 进行线程间通信
- spring+websocket整合(springMVC+spring+MyBatis即SSM框架和
- Hermes Container Hack Day参赛回顾
- 星盾科技-2016年2月24日
- 星盾科技-2016年2月25日
- 星盾科技-2016年2月26日
- 190. Reverse Bits