Case Converter

版本 1.0.0.0 (2.6 KB) 作者: Skynet
Converts character string case to title, sentence, toggle, random, upper, or lower case.
2.2K 次下载
更新时间 2005/6/10

查看许可证

This function uses mostly the 'upper' and 'lower' functions to convert a text string to additional case types including 'Title Case', 'Sentence case', 'tOGGLE cASE', and 'RaNDoMizEd cASe'.

Type 'help caseconvert' for usage details.

Examples:

caseconvert('sample text','title') returns 'Sample Text'
caseconvert('Sample Text','toggle') returns 'sAMPLE tEXT'

caseconvert({'new york' 'california'},'randomized')
returns {'neW yoRk' 'CAlIFORnIA'}

caseconvert({'This Is A Test.' 'Matlab'},{'sentence' 'upper'})
returns {'This is a test.' 'MATLAB'}

[Please subscribe to this file if you use it, so you can be notified of updates.]

引用格式

Skynet (2024). Case Converter (https://www.mathworks.com/matlabcentral/fileexchange/6275-case-converter), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R14SP1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息
致谢

启发作品: changeCase(S, caseType)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Made a few minor changes as suggested by M-Lint.