ConvertExtend extension
- on
Methods
-
toFormatString(
{String format = "#.##"}) → String -
Available on String, provided by the ConvertExtend extension
金额格式化 -
toList(
String connector, {bool? isDecode}) → List< String> -
Available on String, provided by the ConvertExtend extension
根据连接字符拼接的字符串转换成list 示例:"2&71&3&25"connector
连接符isDecode
value是否需要Uri.decodeComponent解码 -
toMap(
String firstSplit, {String secondSplit = "", bool? isDecode}) → Map< String, dynamic> -
Available on String, provided by the ConvertExtend extension
根据连接字符拼接的字符串转换成map 示例:"siteId=2&positionValue=71"firstSplit
一级分隔符secondSplit
二级分隔符isDecode
value是否需要Uri.decodeComponent解码 -
toMapByIdentify(
String startChar, String firstSplit, {String secondSplit = "", bool isDecode = false}) → Map< String, dynamic> -
Available on String, provided by the ConvertExtend extension
根据标识位以连接符组成的字符串解析为map (可能存在非url参数的情况)startChar
解析该字符串之后的参数firstSplit
一级分隔符secondSplit
二级分隔符isDecode
value是否需要Uri.decodeComponent解码 -
toMapEntry(
String splitChar, bool urlDecode) → MapEntry< String, dynamic> ? -
Available on String, provided by the ConvertExtend extension
字符串参数转map对象 -
toMergeUrl(
{String targetUrl = ""}) → String -
Available on String, provided by the ConvertExtend extension
url参数合并(referenceUrl参数向targetUrl合并)targetUrl
合并参数后的url连接 -
toNum(
{num defaultValue = 0}) → num -
Available on String, provided by the ConvertExtend extension
数字字符转换为num(eg. for long float)defaultValue
默认值