📄 smsutils.java
字号:
package edu.soft.buaa.message.sms;
import java.io.*;
import java.util.*;
import java.text.*;
/**
This class has some general purpose functions.
*/
public class SMSUtils
{
/**
String substitution routine.
@param text the initial text.
@param symbol the string to be substituted.
@param value the string that the "symbol" will be substituted with, in the "text" (all occurences).
@return the changed text.
*/
public static String substituteSymbol(String text, String symbol, String value)
{
StringBuffer buffer;
while (text.indexOf(symbol) >= 0)
{
buffer = new StringBuffer(text);
buffer.replace(text.indexOf(symbol), text.indexOf(symbol) + symbol.length(), value);
text = buffer.toString();
}
return text;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -