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 () {

}

}



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


'Computer Language > 유니티' 카테고리의 다른 글

추상 클래스  (0) 2014.05.13
로그 찍기  (0) 2014.05.13
확장 클래스  (0) 2014.05.13
얕은 복사와 깊은 복사  (0) 2014.05.12
out 을 이용하여 메인에서 배열을 써봅시다.  (0) 2014.05.09

+ Recent posts