#include <bitset>
#include <cstring>
void removeDuplicate( char *s ) {
if( s == NULL ) return;
int n = std::strlen(s);
if( n < 2 ) return;
std::bitset<256> exist;
exist.reset();
exist.set(s[0]);
int tail=1;
for( int i=1; i<n; ++i )
if( !exist.test(s[i]) ) {
s[tail++] = s[i];
exist.set(s[i]);
}
for( int i=tail; i<n; ++i )
s[i] = 0;
}