UNPKG

xverse-components-utils

Version:

xverse components utils

17 lines (16 loc) 625 B
/** * 截取字符串中的数字(从index=0 开始) * @param str 带单位的数字 */ export declare function interceptDigit(str: string): number; export declare const calculateStringLength: (str: string) => number; /** * 固定长度截取字符串 * @param str 输入字符串 * @param maxNum 截取的最大长度 * @param needEllipsis 最大长度是否包含 ...[... 算一个字符] * @returns */ export declare const croppingStr: (str: string, maxNum: number, needEllipsis?: boolean) => string; /** 检查数值是否有效,包括所有字段 */ export declare const isValid: (value: any) => boolean;