8.4.2 텍스트 리소스 검색(Retrieving text resources)
8.4.2 텍스트 리소스 검색(Retrieving text resources)
포함된 리소스의 내용을 검색하려면 haxe.Resource의 static 메서드 getString을 사용하고 '리소스 식별자'를 전달합니다:
class Main {
static function main() {
trace(haxe.Resource.getString("welcome"));
}
}
위 코드는 앞서 welcome 식별자로 포함한 hello_message.txt 파일의 내용을 표시합니다.
본문
haxe.Resource.getString("welcome")으로 식별자에 해당하는 텍스트 리소스 내용을 얻습니다.