프로그래머스/Lv.0

[프로그래머스 C#] 문자열의 앞의 n글자

suniverse 2023. 8. 8. 20:07

 

using System;

public class Solution {
    public string solution(string my_string, int n) {
        string answer = "";
        
        answer = my_string.Substring(0, n);
        
        return answer;
    }
}