indexOf() public int indexOf(int ch): 返回指定字符在字符串中第一次出现处的索引,如果此字符串中没有这样的字符,则返回 -1。 int indexOf(String str): 返回指定字符在字符串中第一次出现处的索引,如果此字符串中没有这样的字符,则返回 -1。 public int indexOf(int ch, i
1、替换HTML标签 replaceAll("\\&[a-zA-Z]{0,9};", "").replaceAll("<[^>]*>", "\n\t") 源码如下: /** * 字符串替换 */ package com.you.model; /** * HTML标签替换 * @author YHD * @version */ public class StrRepla