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

📄 smsutils.java

📁 应用SUN的串口通信包和AT命令
💻 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 + -