프로그래머스 181906 접두사인지 확인하기

1 개요[ | ]

프로그래머스 181906 접두사인지 확인하기

2 C++[ | ]

#include <string>
#include <vector>

using namespace std;

int solution(string my_string, string is_prefix) {
    return my_string.substr(0, is_prefix.length()) == is_prefix;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}