⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 replace.java

📁 一本jsp自学教材
💻 JAVA
字号:
package test;
import java.util.*;
public class Replace
{
 public Replace(){}
 public String RepSTR(String resource,String from,String to){
  int j=0;
  int i=0;
  int k=0;
  String newstr="";
  String temp=resource;
  int tagc=from.length();
 while(i<resource.length()){
   if(resource.substring(i).startsWith(from)){
    temp=resource.substring(j,i)+to;
    newstr+=temp;
    i+=tagc;
    j=i;
  }
  else
  {
      i+=1;
  }
 }
  newstr+=resource.substring(j);
  return newstr;
 } 
 public String repItem(String mm){
  String re1="";
  re1=RepSTR(mm,"的","之");
  return re1;
 }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -