source: dev/trunk/ab5.0/jenga/src/common/EasyToken.cpp

Last change on this file was 829, checked in by イグトランス (egtra), 13 years ago

svn:eol-styleとsvn:mime-type(文字コード指定含む)の設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/plain; charset=Shift_JIS
File size: 418 bytes
Line 
1#include "stdafx.h"
2
3std::string Jenga::Common::EasyToken::GetIdentifierToken( const std::string &source, int &sourceIndex )
4{
5 char *token = (char *)malloc( source.size() + 1 );
6
7 for( int i=0; ; i++, sourceIndex++ )
8 {
9 if( ! IsIdentifierChar( source[sourceIndex] ) )
10 {
11 token[i] = 0;
12 break;
13 }
14 token[i] = source[sourceIndex];
15 }
16
17 std::string resultToken = token;
18 free( token );
19
20 return resultToken;
21}
Note: See TracBrowser for help on using the repository browser.