package com.rf.psychological.utils;

import java.util.regex.Pattern;

/**
 * @author lpf
 * @description: String字符串工具类
 * @date 2022/6/2 10:40
 */
public class StringUtils {


    //判断是否为数字(int + double + float)
    public static boolean isNumber(String str) {
        if (str == null || "".equals(str)) {
            return false;
        }
        Pattern pattern = Pattern.compile("^(-|\\+)?\\d+(\\.\\d+)?$");
        return pattern.matcher(str).matches();
    }


}
