MCPcopy Create free account
hub / github.com/Sinflower/WolfDec / StringToCharCodeString_inline

Function StringToCharCodeString_inline

src/WolfDec/3rdParty/CharCode.cpp:1373–1407  ·  view source on GitHub ↗

文字列を1文字4バイトの配列に変換する( 戻り値:変換後のサイズ、ヌル文字含む( 単位:バイト ) )

Source from the content-addressed store, hash-verified

1371
1372// 文字列を1文字4バイトの配列に変換する( 戻り値:変換後のサイズ、ヌル文字含む( 単位:バイト ) )
1373__inline int StringToCharCodeString_inline( const char *Src, int SrcCharCodeFormat, u32 *Dest )
1374{
1375 int DestSize ;
1376 u32 SrcCode ;
1377 const u8 *SrcStr ;
1378 int UseSrcSize ;
1379
1380 SrcStr = ( u8 * )Src ;
1381 DestSize = 0 ;
1382 for(;;)
1383 {
1384 SrcCode = GetCharCode_inline( ( const char * )SrcStr, SrcCharCodeFormat, &UseSrcSize ) ;
1385 SrcStr += UseSrcSize ;
1386 if( SrcCode == 0 )
1387 {
1388 break ;
1389 }
1390
1391 if( Dest != NULL )
1392 {
1393 *Dest = SrcCode ;
1394 Dest ++ ;
1395 }
1396 DestSize += 4 ;
1397 }
1398
1399 if( Dest != NULL )
1400 {
1401 *Dest = 0 ;
1402 Dest ++ ;
1403 }
1404 DestSize += 4 ;
1405
1406 return DestSize ;
1407}
1408
1409// 文字列を1文字4バイトの配列に変換する( 戻り値:変換後のサイズ、ヌル文字含む( 単位:バイト ) )
1410extern int StringToCharCodeString( const char *Src, int SrcCharCodeFormat, u32 *Dest )

Callers 5

StringToCharCodeStringFunction · 0.85
CL_vsprintfFunction · 0.85
CL_atoiFunction · 0.85
CL_atofFunction · 0.85
CL_vsscanfFunction · 0.85

Calls 1

GetCharCode_inlineFunction · 0.85

Tested by

no test coverage detected