mirror of
https://github.com/HighCapable/SweetProperty.git
synced 2025-09-04 01:35:37 +08:00
feat: add toStringMap function
This commit is contained in:
@@ -21,6 +21,12 @@
|
||||
*/
|
||||
package com.highcapable.sweetproperty.utils
|
||||
|
||||
/**
|
||||
* 转换当前 [Map] 键值到字符串类型
|
||||
* @return [Map]<[String], [String]>
|
||||
*/
|
||||
internal inline fun <reified K, V> Map<K, V>.toStringMap() = mapKeys { e -> e.key.toString() }.mapValues { e -> e.value.toString() }
|
||||
|
||||
/**
|
||||
* 当数组不为空时返回非空
|
||||
* @return [T] or null
|
||||
|
Reference in New Issue
Block a user