c#字符串操作2
来源:互联网 发布:unity3d模型格式 编辑:程序博客网 时间:2024/06/07 10:06
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { string str = "This is an Apple."; int num1=str.Split('A').Length-1; Console.WriteLine("This is an Apple."); Console.Write("A在其中共出现"); Console.Write(num1); Console.WriteLine("次!"); int num2 = str.Split(' ').Length; Console.Write("在其中共出现"); Console.Write(num2); Console.WriteLine("个单词!"); string str1 = str.ToUpper(); Console.WriteLine(str1); char[] str2 = str.ToCharArray(); char[] str3 = new char[str2.Length]; for (int i = 0; i < str2.Length ; i++) { str3[str2.Length - i-1] = str2[i]; } Console.WriteLine(str3); Console.ReadLine(); } }}
0 0
- c#字符串操作2
- C# 字符串格式化 字符串操作
- C#常用字符串操作
- C# 字符串操作
- C# 字符串操作
- C#优化字符串操作
- C#优化字符串操作
- C#优化字符串操作
- C#优化字符串操作
- C#优化字符串操作
- C#优化字符串操作
- C#优化字符串操作
- C# 字符串操作
- C#优化字符串操作
- C#优化字符串操作
- c# 字符串操作
- C#优化字符串操作
- C#优化字符串操作
- 为什么采用Always On SSL?
- Java - 递归 - 和文件流关联的集合 - Properties
- 【美乃滋酱学java】FilenameFliter,list和listFiles
- Android 4.4.2系统无法使用QQHD的解决方法
- Unified Service Desktop 相关资料
- c#字符串操作2
- C++中虚析构函数的作用
- windows 如何查看端口占用情况
- scramble string
- 基础总结篇之二:Activity的四种launchMode
- 在linux下使用curl访问 多参数url GET参数问题
- 数据库设计中的14个技巧
- 功率因素正负的解释
- oc的协议(protocol)