forked from fanruan/fineui
Browse Source
* commit '5f1709e9cca9747bf90a6f54ceb2446b1aafc2ba': docs: 调整注释位置 docs: 加入注释 feat: KERNEL-798 core/func/stringmaster
alan
5 years ago
2 changed files with 65 additions and 0 deletions
@ -0,0 +1,56 @@
|
||||
/** |
||||
* 判断字符串是否已指定的字符串开始 |
||||
* @param str source字符串 |
||||
* @param {String} startTag 指定的开始字符串 |
||||
* @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false |
||||
*/ |
||||
export declare type _startWith = (str: string, startTag: string) => boolean; |
||||
|
||||
/** |
||||
* 判断字符串是否以指定的字符串结束 |
||||
* @param str source字符串 |
||||
* @param {String} endTag 指定的字符串 |
||||
* @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false |
||||
*/ |
||||
export declare type _endWith = (str: string, endTag: string) => boolean; |
||||
|
||||
/** |
||||
* 获取url中指定名字的参数 |
||||
* @param str source字符串 |
||||
* @param {String} name 参数的名字 |
||||
* @return {String} 参数的值 |
||||
*/ |
||||
export declare type _getQuery = (str: string, name: string) => string|null; |
||||
|
||||
/** |
||||
* 给url加上给定的参数 |
||||
* @param str source字符串 |
||||
* @param {Object} paras 参数对象,是一个键值对对象 |
||||
* @return {String} 添加了给定参数的url |
||||
*/ |
||||
export declare type _appendQuery = (str: string, paras: {[key: string]: string|number}) => string; |
||||
|
||||
/** |
||||
* 将所有符合第一个字符串所表示的字符串替换成为第二个字符串 |
||||
* @param str source字符串 |
||||
* @param {String} s1 要替换的字符串的正则表达式 |
||||
* @param {String} s2 替换的结果字符串 |
||||
* @returns {String} 替换后的字符串 |
||||
*/ |
||||
export declare type _replaceAll = (str: string, s1: string, s2: string) => string; |
||||
|
||||
/** |
||||
* 总是让字符串以指定的字符开头 |
||||
* @param str source字符串 |
||||
* @param {String} start 指定的字符 |
||||
* @returns {String} 以指定字符开头的字符串 |
||||
*/ |
||||
export declare type _perfectStart = (str: string, start: string) => string; |
||||
|
||||
/** |
||||
* 获取字符串中某字符串的所有项位置数组 |
||||
* @param str source字符串 |
||||
* @param {String} sub 子字符串 |
||||
* @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组 |
||||
*/ |
||||
export declare type _allIndexOf = (str: string, sub: string) => number[]; |
Loading…
Reference in new issue