반응형
String메서드 알아보러가기
C# - String (찾기, 변형, 분할, 제거 메서드)
1. 찾기 01 Contains 특정 문자열이 문자열안에 있는지 확인 public bool Contains (string value); 반환 Boolean : 문자열이 있으면 true 없으면 false 를 반환한다. string name = "Pink Pig"; bool found = name.Contains("Pink"); Con
code-piggy.tistory.com
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace baek2
{
class Program
{
static void Main(string[] args)
{
string input = Console.ReadLine();
Console.WriteLine(input.Length);
}
}
}
반응형
'코딩테스트 준비 > 백준 C#' 카테고리의 다른 글
백준 C# 11654 (0) | 2023.04.26 |
---|---|
백준 C# 9080 (0) | 2023.04.26 |
백준 C# 27866 (0) | 2023.04.21 |
백준 C# 1546 (0) | 2023.04.21 |
백준 C# 10811 (0) | 2023.04.18 |
댓글