MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / Style_StrGetCharSet

Function Style_StrGetCharSet

src/Styles.c:2425–2444  ·  view source on GitHub ↗

============================================================================= Style_StrGetCharSet()

Source from the content-addressed store, hash-verified

2423// Style_StrGetCharSet()
2424//
2425BOOL Style_StrGetCharSet ( LPCWSTR lpszStyle, int *i )
2426{
2427 WCHAR tch[256];
2428 WCHAR *p;
2429 int iValue;
2430 int itok;
2431 if ( p = StrStrI ( lpszStyle, L"charset:" ) ) {
2432 lstrcpy ( tch, p + CSTRLEN ( L"charset:" ) );
2433 if ( p = StrChr ( tch, L';' ) ) {
2434 *p = L'\0';
2435 }
2436 TrimString ( tch );
2437 itok = swscanf ( tch, L"%i", &iValue );
2438 if ( itok == 1 ) {
2439 *i = iValue;
2440 return TRUE;
2441 }
2442 }
2443 return FALSE;
2444}
2445
2446
2447//=============================================================================

Callers 3

Style_SelectFontFunction · 0.85
Style_SelectColorFunction · 0.85
Style_SetStylesFunction · 0.85

Calls 1

TrimStringFunction · 0.85

Tested by

no test coverage detected