namespace ColdMint.scripts.utils; public class StrUtils { /// /// Gets the last line of a string /// 获取某个字符串的最后一行 /// /// /// public static string GetLastLine(string str) { var index = str.LastIndexOf('\n'); return index == -1 ? str : str[(index + 1)..]; } }