padStart.d.ts 590 B

1234567891011121314151617181920212223
  1. import { XEUtilsMethods } from '../xe-utils'
  2. /**
  3. * 用指定字符从前面开始补全字符串
  4. * @param str 字符串
  5. * @param targetLength 结果长度
  6. * @param padString 补全字符
  7. */
  8. export declare function padStart(str: string, targetLength: number, padString?: string): string;
  9. declare module '../xe-utils' {
  10. interface XEUtilsMethods {
  11. /**
  12. * 用指定字符从前面开始补全字符串
  13. * @param str 字符串
  14. * @param targetLength 结果长度
  15. * @param padString 补全字符
  16. */
  17. padStart: typeof padStart;
  18. }
  19. }
  20. export default padStart