|
|
@ -4,7 +4,7 @@ |
|
|
|
* @param {String} startTag 指定的开始字符串 |
|
|
|
* @param {String} startTag 指定的开始字符串 |
|
|
|
* @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false |
|
|
|
* @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export declare type _startWith = (str: string, startTag: string) => boolean; |
|
|
|
export type _startWith = (str: string, startTag: string) => boolean; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 判断字符串是否以指定的字符串结束 |
|
|
|
* 判断字符串是否以指定的字符串结束 |
|
|
@ -12,7 +12,7 @@ export declare type _startWith = (str: string, startTag: string) => boolean; |
|
|
|
* @param {String} endTag 指定的字符串 |
|
|
|
* @param {String} endTag 指定的字符串 |
|
|
|
* @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false |
|
|
|
* @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export declare type _endWith = (str: string, endTag: string) => boolean; |
|
|
|
export type _endWith = (str: string, endTag: string) => boolean; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取url中指定名字的参数 |
|
|
|
* 获取url中指定名字的参数 |
|
|
@ -20,7 +20,7 @@ export declare type _endWith = (str: string, endTag: string) => boolean; |
|
|
|
* @param {String} name 参数的名字 |
|
|
|
* @param {String} name 参数的名字 |
|
|
|
* @return {String} 参数的值 |
|
|
|
* @return {String} 参数的值 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export declare type _getQuery = (str: string, name: string) => string|null; |
|
|
|
export type _getQuery = (str: string, name: string) => string|null; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 给url加上给定的参数 |
|
|
|
* 给url加上给定的参数 |
|
|
@ -28,7 +28,7 @@ export declare type _getQuery = (str: string, name: string) => string|null; |
|
|
|
* @param {Object} paras 参数对象,是一个键值对对象 |
|
|
|
* @param {Object} paras 参数对象,是一个键值对对象 |
|
|
|
* @return {String} 添加了给定参数的url |
|
|
|
* @return {String} 添加了给定参数的url |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export declare type _appendQuery = (str: string, paras: {[key: string]: string|number}) => string; |
|
|
|
export type _appendQuery = (str: string, paras: {[key: string]: string|number}) => string; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 将所有符合第一个字符串所表示的字符串替换成为第二个字符串 |
|
|
|
* 将所有符合第一个字符串所表示的字符串替换成为第二个字符串 |
|
|
@ -37,7 +37,7 @@ export declare type _appendQuery = (str: string, paras: {[key: string]: string|n |
|
|
|
* @param {String} s2 替换的结果字符串 |
|
|
|
* @param {String} s2 替换的结果字符串 |
|
|
|
* @returns {String} 替换后的字符串 |
|
|
|
* @returns {String} 替换后的字符串 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export declare type _replaceAll = (str: string, s1: string, s2: string) => string; |
|
|
|
export type _replaceAll = (str: string, s1: string, s2: string) => string; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 总是让字符串以指定的字符开头 |
|
|
|
* 总是让字符串以指定的字符开头 |
|
|
@ -45,7 +45,7 @@ export declare type _replaceAll = (str: string, s1: string, s2: string) => strin |
|
|
|
* @param {String} start 指定的字符 |
|
|
|
* @param {String} start 指定的字符 |
|
|
|
* @returns {String} 以指定字符开头的字符串 |
|
|
|
* @returns {String} 以指定字符开头的字符串 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export declare type _perfectStart = (str: string, start: string) => string; |
|
|
|
export type _perfectStart = (str: string, start: string) => string; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取字符串中某字符串的所有项位置数组 |
|
|
|
* 获取字符串中某字符串的所有项位置数组 |
|
|
@ -53,9 +53,8 @@ export declare type _perfectStart = (str: string, start: string) => string; |
|
|
|
* @param {String} sub 子字符串 |
|
|
|
* @param {String} sub 子字符串 |
|
|
|
* @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组 |
|
|
|
* @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export declare type _allIndexOf = (str: string, sub: string) => number[]; |
|
|
|
export type _allIndexOf = (str: string, sub: string) => number[]; |
|
|
|
|
|
|
|
type _string = { |
|
|
|
declare type _string = { |
|
|
|
|
|
|
|
startWith: _startWith; |
|
|
|
startWith: _startWith; |
|
|
|
endWith: _endWith; |
|
|
|
endWith: _endWith; |
|
|
|
getQuery: _getQuery; |
|
|
|
getQuery: _getQuery; |
|
|
|