============================================================================= Style_StrGetCharSet()
| 2423 | // Style_StrGetCharSet() |
| 2424 | // |
| 2425 | BOOL 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 | //============================================================================= |
no test coverage detected