MCPcopy Create free account
hub / github.com/Sinflower/UberWolf / GetStringCharAddress

Function GetStringCharAddress

3rdParty/DXLib/CharCode.cpp:2383–2410  ·  view source on GitHub ↗

指定番号の文字のアドレスを取得する

Source from the content-addressed store, hash-verified

2381
2382// 指定番号の文字のアドレスを取得する
2383extern const char *GetStringCharAddress( const char *String, int CharCodeFormat, int Index )
2384{
2385 u32 CharCode ;
2386 int CharBytes ;
2387 int Count ;
2388 int Address ;
2389
2390 Address = 0 ;
2391 Count = 0 ;
2392 for(;;)
2393 {
2394 if( Count == Index )
2395 {
2396 return ( const char * )&( ( u8 * )String )[ Address ] ;
2397 }
2398
2399 CharCode = GetCharCode_inline( ( const char * )&( ( u8 * )String )[ Address ], CharCodeFormat, &CharBytes ) ;
2400 if( CharCode == 0 )
2401 {
2402 break ;
2403 }
2404
2405 Address += CharBytes ;
2406 Count ++ ;
2407 }
2408
2409 return NULL ;
2410}
2411
2412// 指定番号の文字のコードを取得する
2413extern u32 GetStringCharCode( const char *String, int CharCodeFormat, int Index )

Callers

nothing calls this directly

Calls 1

GetCharCode_inlineFunction · 0.85

Tested by

no test coverage detected