From f448a4aff7c479db081175c9206913cc6dedf553 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 09 十二月 2025 16:23:03 +0800
Subject: [PATCH] 0312 优化字符串拼接函数
---
Main/Utility/UIHelper.cs | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index f907b9d..d2e3d43 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -40,7 +40,7 @@
if (part != 0)
{
if (needZero)
- result = StringUtility.Contact(numbers[0] + result);
+ result = StringUtility.Concat(numbers[0] + result);
result = numbers[part] + (unitPlace == 1 ? "" : units[unitPlace - 2]) + result; // 鍗曚綅鍙湪鍗併�佺櫨銆佸崈銆佷竾鍐呴儴浣跨敤
needZero = false;
@@ -129,20 +129,20 @@
{
if (attrName.Length == 2)
{
- suitStr = StringUtility.Contact(suitStr, attrName[i], " ");
+ suitStr = StringUtility.Contact(suitStr, attrName[i].ToString(), " ");
}
else if (attrName.Length == 3)
{
- suitStr = StringUtility.Contact(suitStr, attrName[i], " ");
+ suitStr = StringUtility.Contact(suitStr, attrName[i].ToString(), " ");
}
else
{
- suitStr = StringUtility.Contact(suitStr, attrName[i]);
+ suitStr = StringUtility.Contact(suitStr, attrName[i].ToString());
}
}
else
{
- suitStr = StringUtility.Contact(suitStr, attrName[i]);
+ suitStr = StringUtility.Contact(suitStr, attrName[i].ToString());
}
}
return suitStr;
@@ -728,17 +728,17 @@
{
case TextColType.None:
case TextColType.White:
- return StringUtility.Contact("<color=#", bright ? "ffffff" : "ffffff", ">", msg, "</color>");
+ return StringUtility.Concat("<color=#", bright ? "ffffff" : "ffffff", ">", msg, "</color>");
case TextColType.titleSelectColor:
return StringUtility.Contact("<color=#7F4139>", msg, "</color>");
case TextColType.titleUnSelectColor:
return StringUtility.Contact("<color=#6E5C60>", msg, "</color>");
case TextColType.Red:
- return StringUtility.Contact("<color=#", bright ? "ea261e" : "ea261e", ">", msg, "</color>");
+ return StringUtility.Concat("<color=#", bright ? "ea261e" : "ea261e", ">", msg, "</color>");
case TextColType.Pink:
- return StringUtility.Contact("<color=#", bright ? "f6408d" : "ff7c7c", ">", msg, "</color>");
+ return StringUtility.Concat("<color=#", bright ? "f6408d" : "ff7c7c", ">", msg, "</color>");
case TextColType.Green:
- return StringUtility.Contact("<color=#", bright ? "248B12" : "2ae337", ">", msg, "</color>");
+ return StringUtility.Concat("<color=#", bright ? "248B12" : "2ae337", ">", msg, "</color>");
case TextColType.NavyBrown:
return StringUtility.Contact("<color=#6e4c31>", msg, "</color>");
case TextColType.DarkGreen:
@@ -796,7 +796,7 @@
public static string AppendColor(Color color, string msg)
{
- return StringUtility.Contact("<color=#", ColorToHexWithHash(color), ">", msg, "</color>");
+ return StringUtility.Concat("<color=#", ColorToHexWithHash(color), ">", msg, "</color>");
}
--
Gitblit v1.8.0