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. Mysql的常用用法

    一.mysql中limit的用法详解[数据分页常用] 在我们使用查询语句的时候,经常要返回前几条或者中间某几行数据,这个时候怎么办呢?不用担心,mysql已经为我们提供了这样一个功能. SELECT  ...

  2. 【iCore3 双核心板】例程三十二:UART_IAP_ARM实验——更新升级STM32

    实验指导书及代码包下载: http://pan.baidu.com/s/1hrnLJwC iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...

  3. spring-session整合

    如果项目之前没有整合过spring-data-redis的话,这一步需要先做,在maven中添加这两个依赖: <dependency>     <groupId>org.spr ...

  4. 关于int,long,long long

    偶然的,我同学给我发了一个面试题:long 占多少字节 对于这个问题我也不好多说,有时候可能会想的比较多,这个题也需要多想一下 <1>在16位机器上,int 2字节, long 4字节, ...

  5. NET 框架基本原理透析⑵

    生成.打包.部署及管理应用程序与类型 要生成就离不开程,序集,程序集是包含一个或多个类型定义文件和资源文件的集合.在程序集包含的所有文件中,有一个文件用于保存清单.清单是另外一组元数据表的集合,其中主 ...

  6. JS-011-颜色进制转换(RGB转16进制;16进制转RGB)

    在网页开发的时候,经常需要进行颜色设置,因而经常需要遇到进行颜色进制转换的问题,例如:RGB转16进制:16进制转RGB),前几天在测试的时候,发现网站的颜色进制转换某类16进制颜色(例如:#0000 ...

  7. .NET中string[]数组和List<string>泛型的相互转换以及Array类的Sort()方法(转)

    从string[]转List<string>: " }; List<string> list = new List<string>(str); 从List ...

  8. echarts入门基础,画柱型图

    注意:一定要自己引入echarts库 <!DOCTYPE html> <html> <head> <meta charset="UTF-8" ...

  9. python 安装pillow

    安装 警告 Pillow >= 2.1.0 不支持 “import _imaging”.请使用 “from PIL.Image import core as _imaging” 代替. 警告 P ...

  10. FTP上传

    package cn.zto.util; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileIn ...