728x90
문자열을 역순을 출력하기 위해서는 다음과 같은 코드를 작성하면 된다.
▶ 실행 코드
using System.Linq;
String text = "hello";
String temp = new String(text.ToCharArray().Reverse().ToArray());
Debug(text + " -> " + temp);
System.Ling을 선언한 후에 temp와 같이 작성해주면 역순으로 출력이 가능하다.
▶ 실행 결과
hello -> olleh
728x90
반응형
'소프트웨어 개발 > 유니티(Unity)' 카테고리의 다른 글
[Unity] '' is an incorrect path for a scene file. BuildPlayer expects paths relative to the project folder. 오류 해결방법! (0) | 2021.11.09 |
---|---|
[Unity] 리스트 관련 함수 (0) | 2021.10.14 |
[Unity] Json에 저장된 한글 깨짐 현상 (0) | 2021.07.30 |
[Unity] 유니티 단축키 모음 (0) | 2021.07.26 |
[유니티] DontDestroyOnLoad 싱글톤 패턴 사용법 (0) | 2021.06.22 |
댓글