Computer Language/유니티

문자열 거꾸로 찍기

알 수 없는 사용자 2014. 5. 13. 11:21

using UnityEngine;

using System.Collections;


public static class StringExtension{

public static string Reverse(this string s){

string text = "";

for(int i = s.Length - 1; i >= 0; i--)

{

text += s[i];

}

return text;

}

}


public class chap8_1 : MonoBehaviour {


// Use this for initialization

void Start () {

string text = "abcde";

text = text.Reverse();

print(text);

}

// Update is called once per frame

void Update () {

}

}



오예 신나부러~~!!!!~!~!~