博客
关于我
[日常]中文字符串比较大小的方式
阅读量:659 次
发布时间:2019-03-15

本文共 137 字,大约阅读时间需要 1 分钟。

数字比较大小很简单

英文字符比较 , 是根据逐个字符的ascii码比较大小的

中文字符比较 , 是根据逐个字符的uincode码比较的

比如 '陶' 是 \u9676 是十六进制 , 十进制是38518  ; '士' 是 \u58eb ,十进制是 22763

因此 陶 > 士

转载地址:http://laimz.baihongyu.com/

你可能感兴趣的文章
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>