差异化竞争阵地的所在【周技术进阶】-从BS 项目C#最基础截取字符串方法开始

效果

代码

cs 复制代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleAppNumberOneHelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("hello world!2020Year!");
            
                 #region 2 截取字符串方法
            //
            string originalString = "Hello, World!";
            string truncatedString = originalString.Substring(0, 5); // 截取从索引0开始的5个字符;  会获取到Hello内容打印出来; 8.31
            Console.WriteLine(truncatedString);
            //截取前6个字符;
            string sixS = originalString.Substring(0, 6);
            Console.WriteLine(sixS);
            //W1
            string str = "业务为先,代码再写的顺序,才是正确的写代码入门的方式所在,以至于进阶所在!";

            string waterStr2 = str.Substring(0, 12);
            Console.WriteLine(waterStr2);




            #endregion
            Console.ReadLine();
        }
    }
}
相关推荐
翔云API6 分钟前
人证合一接口:智能化身份认证的最佳选择
大数据·开发语言·node.js·ocr·php
jimmy.hua6 分钟前
C++刷怪笼(5)内存管理
开发语言·数据结构·c++
xiaobai12 310 分钟前
二叉树的遍历【C++】
开发语言·c++·算法
DieSnowK16 分钟前
[项目][WebServer][Makefile & Shell]详细讲解
开发语言·c++·http·makefile·shell·项目·webserver
Freak嵌入式17 分钟前
全网最适合入门的面向对象编程教程:50 Python函数方法与接口-接口和抽象基类
java·开发语言·数据结构·python·接口·抽象基类
冷凝女子19 分钟前
【QT】基于HTTP协议的网络应用程序
开发语言·qt·http
知识分享小能手23 分钟前
mysql学习教程,从入门到精通,SQL 删除数据(DELETE 语句)(19)
大数据·开发语言·数据库·sql·学习·mysql·数据开发
鸽芷咕31 分钟前
【Python报错已解决】libpng warning: iccp: known incorrect sRGB profile
开发语言·python·机器学习·bug
白总Server37 分钟前
MongoDB解说
开发语言·数据库·后端·mongodb·golang·rust·php
ling1s38 分钟前
C#基础(13)结构体
前端·c#