https://msdn.microsoft.com/en-us/library/system.globalization.textinfo.totitlecase(v=vs.110).aspx

Converts the specified string to title case (except for words that are entirely in uppercase, which are considered to be acronyms).

Remarks

Generally, title casing converts the first character of a word to uppercase and the rest of the characters to lowercase.

However, this method does not currently provide proper casing to convert a word that is entirely uppercase, such as an acronym.

The following table shows the way the method renders several strings.

Input

Language

Expected result

Actual result

war and peace

English

War and Peace

War And Peace

Per anhalter durch die Galaxis

German

Per Anhalter durch die Galaxis

Per Anhalter Durch Die Galaxis

les naufragés d'ythaq

French

Les Naufragés d'Ythaq

Les Naufragés D'ythaq

As illustrated above, the ToTitleCase method provides an arbitrary casing behavior which is not necessarily linguistically correct.

A linguistically correct solution would require additional rules, and the current algorithm is somewhat simpler and faster.

We reserve the right to make this API slower in the future.

The current implementation of the ToTitleCase method yields an output string that is the same length as the input string.

However, this behavior is not guaranteed and could change in a future implementation.

TextInfo的更多相关文章

  1. 吴裕雄 Bootstrap 前端框架开发——Bootstrap 辅助类:"text-info" 类的文本样式

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  2. Bootstrap WPF Style,Bootstrap风格的WPF样式

    简介 GitHub地址:https://github.com/ptddqr/bootstrap-wpf-style 此样式基于bootstrap-3.3.0,样式文件里的源码行数都是指的这个版本.CS ...

  3. .net汉字转字母

    目前手上有一个需要实现:将用户输入的姓名转换成汉语拼音. 使用枚举,既麻烦又易出错,发现有一个微软拼音转换工具类ChnCharInfo.dll,在此记录下: 首先需要引入此dll, 链接: http: ...

  4. C#开发微信门户及应用(12)-使用语音处理

    我们知道,微信最开始就是做语音聊天而使得其更加流行的,因此语音的识别处理自然也就成为微信交流的一个重要途径,微信的开发接口,也提供了对语音的消息请求处理.本文主要介绍如何利用语音的识别,对C#开发的微 ...

  5. ABP集合贴

    thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>t ...

  6. [转]Code! MVC 5 App with Facebook, Twitter, LinkedIn and Google OAuth2 Sign-on (C#)

    本文转自:https://www.asp.net/mvc/overview/security/create-an-aspnet-mvc-5-app-with-facebook-and-google-o ...

  7. Bootsrap基本应用

    Bootsrap 用法: <!DOCTYPE html> <html lang="en"> <head> <meta charset=&q ...

  8. bootstrap自学总结不间断更新

    2.栅格系统 container-fluid 自适应宽度100% container 固定宽度(适应响应式) 屏幕宽度=x     x>=1200            1170 992< ...

  9. bootstrap学习笔记--bootstrap排版类的使用

    标题 Bootstrap 中定义了所有的 HTML 标题(h1 到 h6)的样式,这个和一般的html没啥区别.请看下面的实例: <h1>测试1 h1</h1> <h2& ...

随机推荐

  1. cms修改栏目单页样式错位调整

    if (dt.Rows[0]["ClassTemplet"].ToString().Trim() == "") { rows_key.Style.Value = ...

  2. php使用 memcache 来存储 session 方法总结

    设置session用memcache来存储 方法I: 在 php.ini 中全局设置 session.save_handler = memcache session.save_path = " ...

  3. 【转】Unity中的协同程序-使用Promise进行封装(二)

    原文:http://gad.qq.com/program/translateview/7170970 译者:王磊(未来的未来)    审校:崔国军(飞扬971)   在上一篇文章中,我们的注意力主要是 ...

  4. m=m++,结果让你大吃一惊。

    如图,本来以为m=m++和m++是同一个效果,没想到m的值居然还是0. 原来m++是一个表达式,是有返回值的,它的返回值就是m自加前的值,Java对自加是这样处理的:首先把m的值(注意是值,不是引用) ...

  5. 数据库表结构对比同步mysqldiff

    开发服务器的数据库表结构进行了修改,或者修改过多,为了与线上的数据库结构同步,可以使用mysqldiff工具对线上数据库打补丁. mysqldiff Windows下载地址:http://dev.my ...

  6. 文件上传去除"Content-Disposition: form-data"

    某个项目中为了统一处理文件上传业务,创建了一个FileUpload Handle,由于上传客户端用到各种技术,当时为了方便断点续传,就直接接收请求中的文件内容(可能是分片),所以处理的不是规范的htt ...

  7. The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....

    遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误.....,查找的 ...

  8. 利用Java进行MySql数据库的导入和导出

    利用Java来进行Mysql数据库的导入和导出的总体思想是通过Java来调用命令窗口执行相应的命令. MySql导出数据库的命令如下: mysqldump -uusername -ppassword  ...

  9. 简介AngularJS中使用factory和service的方法

    AngularJS支持使用服务的体系结构“关注点分离”的概念.服务是JavaScript函数,并负责只做一个特定的任务.这也使得他们即维护和测试的单独实体.控制器,过滤器可以调用它们作为需求的基础.服 ...

  10. paper 94:视觉领域博客资源1之中国部分

    这是收录的图像视觉领域的博客资源的第一部分,包含:中国内地.香港.台湾 这些名人大家一般都熟悉,本文仅收录了包含较多资料的个人博客,并且有不少更新,还有些名人由于分享的paper.code或者数据集不 ...