2022-09-19 【C#】文字列の最後の1文字を削除する C# 文字列の最後の1文字を削除する Substringメソッドを使うことでできます string str = "abc" str = str.Substring(0, str.Length - 1); // str → "ab"