string RemoveFirstCharacter(string input)
{
    // 检查字符串是否为空或只有一个字符
    if (string.IsNullOrEmpty(input) || input.Length <= 1)
    {
        return string.Empty;
    }
    // 去掉第一个字符并返回剩余的字符串
    return input.Substring(1);
}
// 示例用法
string originalString = "Hello";
string result = RemoveFirstCharacter(originalString);
Console.WriteLine(result); // 输出: ello上一篇:c# mongodb
下一篇:c# interlocked
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站