文字列クラス


  RemoveEnclose



  
// *********************************************************
// 文字列が指定した文字で囲まれていたらその文字を取り去る
// 戻り値 : 無し
// *********************************************************
void LboxStringRemoveEnclose( LPTSTR pszBuffer, int c )
{
	if ( pszBuffer[0] == (char)c &&
		pszBuffer[lstrlen(pszBuffer)-1] == (char)c ) {
		MoveMemory( pszBuffer, pszBuffer + 1, lstrlen( pszBuffer ) );
		pszBuffer[lstrlen(pszBuffer)-1] = 0x00;
	}
}
void LboxString::RemoveEnclose( LPTSTR pszBuffer, int c )
{
	LboxStringRemoveEnclose( pszBuffer, c );
}
void LboxString::RemoveEnclose( int c )
{
	LboxStringRemoveEnclose( LboxString::szLboxString, c );
}
void LboxStringRemoveEnclose( LPTSTR pszBuffer, int c1, int c2 )
{
	if ( pszBuffer[0] == (char)c1 &&
		pszBuffer[lstrlen(pszBuffer)-1] == (char)c2 ) {
		MoveMemory( pszBuffer, pszBuffer + 1, lstrlen( pszBuffer ) );
		pszBuffer[lstrlen(pszBuffer)-1] = 0x00;
	}
}
void LboxString::RemoveEnclose( LPTSTR pszBuffer, int c1, int c2 )
{
	LboxStringRemoveEnclose( pszBuffer, c1, c2 );
}
void LboxString::RemoveEnclose( int c1, int c2 )
{
	LboxStringRemoveEnclose( LboxString::szLboxString, c1, c2 );
}
  

LboxStringRemoveEnclose










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ