import { TypeSimpleObject } from '../types'; /** * 简单模板函数 * @method substitute * @param {String} str 要替换模板的字符串 * @param {Object} obj 模板对应的数据对象 * @param {RegExp} [reg=/\\?\{\{([^{}]+)\}\}/g] 解析模板的正则表达式 * @return {String} 替换了模板的字符串 * @example * import { substitute } from '@spore-ui/tskit'; * substitute('{{city}}欢迎您', {city:'北京'}); // '北京欢迎您' */ export declare function substitute(str: string, obj: TypeSimpleObject, reg?: RegExp): string; export default substitute;