Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的一个 java 方法返回一个段落字符串。如何验证字符串中是否包含省略号 (...)?
myString.contains ("...");
它在文档中。
尝试:
if ( myString.indexOf("...") != -1 ) { // string contains ellipsis }