void PathQuoteSpaces(LPTSTR Path);
引数の意味は以下の通り。
Path | パス。空白が含まれているならば、関数の実行後、ダブルクォーテーションを加えたパスが返却される。 |
void TestPathQuoteSpaces(void) { char Path1[100] = "c:\\windows\\"; char Path2[100] = "c:\\Program Files\\"; printf("'%s'にスペースが含まれている場合は、ダブルクォーテーションで囲む。\n", Path1); PathQuoteSpaces(Path1); printf("結果: %s\n\n", Path1); printf("'%s'にスペースが含まれている場合は、ダブルクォーテーションで囲む。\n", Path2); PathQuoteSpaces(Path2); printf("結果: %s\n", Path2); }