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

Function TrimString

src/Helpers.c:1199–1217  ·  view source on GitHub ↗

============================================================================= TrimString()

Source from the content-addressed store, hash-verified

1197// TrimString()
1198//
1199BOOL TrimString ( LPWSTR lpString )
1200{
1201 LPWSTR psz;
1202 if ( !lpString || !*lpString ) {
1203 return FALSE;
1204 }
1205 // Trim left
1206 psz = lpString;
1207 while ( *psz == L' ' ) {
1208 psz = CharNext ( psz );
1209 }
1210 MoveMemory ( lpString, psz, sizeof ( WCHAR ) * ( lstrlen ( psz ) + 1 ) );
1211 // Trim right
1212 psz = StrEnd ( lpString );
1213 while ( * ( psz = CharPrev ( lpString, psz ) ) == L' ' ) {
1214 *psz = L'\0';
1215 }
1216 return TRUE;
1217}
1218
1219
1220//=============================================================================

Callers 12

Toolbar_GetButtonsFunction · 0.85
Toolbar_SetButtonsFunction · 0.85
ExtractFirstArgumentFunction · 0.85
Style_StrGetFontFunction · 0.85
Style_StrGetFontQualityFunction · 0.85
Style_StrGetCharSetFunction · 0.85
Style_StrGetSizeFunction · 0.85
Style_StrGetSizeStrFunction · 0.85
Style_StrGetColorFunction · 0.85
Style_StrGetCaseFunction · 0.85
Style_StrGetAlphaFunction · 0.85
ParseCommandLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected