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

Function Style_StrGetCase

src/Styles.c:2540–2559  ·  view source on GitHub ↗

============================================================================= Style_StrGetCase()

Source from the content-addressed store, hash-verified

2538// Style_StrGetCase()
2539//
2540BOOL Style_StrGetCase ( LPCWSTR lpszStyle, int *i )
2541{
2542 WCHAR tch[256];
2543 WCHAR *p;
2544 if ( p = StrStrI ( lpszStyle, L"case:" ) ) {
2545 lstrcpy ( tch, p + CSTRLEN ( L"case:" ) );
2546 if ( p = StrChr ( tch, L';' ) ) {
2547 *p = L'\0';
2548 }
2549 TrimString ( tch );
2550 if ( tch[0] == L'u' || tch[0] == L'U' ) {
2551 *i = SC_CASE_UPPER;
2552 return TRUE;
2553 } else if ( tch[0] == L'l' || tch[0] == L'L' ) {
2554 *i = SC_CASE_LOWER;
2555 return TRUE;
2556 }
2557 }
2558 return FALSE;
2559}
2560
2561
2562//=============================================================================

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