字符串常用的方法
摘要:1.判断字符串是否包含某个字符(返回值为此字符的索引位置) string.indexof("")//方法 2.获取字符串的长度 string.length//属性 3.判断字符串是否相等 (1)A==B (2)A.Equals(B) 4.字符串的截取 (1)string.(起始索引位置,截取长度)
阅读全文
posted @ 2022-03-08 23:59
posted @ 2022-03-08 23:59
Powered by:
博客园
Copyright © 2025 一个不正经的正经人
Powered by .NET 9.0 on Kubernetes