//-------------------------------
// 先頭空白削除
//-------------------------------
void Trim2(char *tmp)
{
     int i;
     int count = 0; 

     if ( tmp == NULL ) 
     {
          return;
     }
     //文字列長を取得する 
     count = strlen(tmp);
 
     // 先頭から順に空白でない位置を探す
     i = 0; 
     while ( tmp[i] != '\0' && tmp[i] == ' ' ) 
          i++;

     if(i < count)
          strcpy_s(tmp,count - i+1, &tmp[i]); 
 
     return;
}