sscanf 에 사용된 이 문법에 관해서..
글쓴이: kwonjunki / 작성시간: 금, 2004/06/04 - 3:18오후
포팅을 하다보니 상당히 생소한 문장이 나오네요..
이리저리 수소문을 해보아도 아시는분은 안계시고..;;
아시는분 계시면 알려주셨으면 합니다 ㅠ0ㅠ
(당췌.. "%[^=] = \"%[^\"]\"" <--- 이건 어떻게 해석(?)을 해야..ㅠ0ㅠ)
1) sscanf(where, "[%[^]]", sec);
2) sscanf (where, "%[^=] = \"%[^\"]\"", key, val);
3) sscanf (where, "%[^=] = '%[^\']'", key, val);
4) sscanf (where, "%[^=] = %[^;#]", key, val);
Forums:
man sscanf 해보니 CONVERSIONS 부분에 이런 치환 문자가
man sscanf 해보니 CONVERSIONS 부분에 이런 치환 문자가 있더군요.
[
Matches a nonempty sequence of characters from the specified set of accepted characters; the next pointer must be a pointer to char, and there must be enough room for all the characters in the string, plus a terminating NUL character. The usual skip of leading white space is suppressed. The string is to be made up of characters in (or not in) a particular set; the set is defined by the characters between the open bracket [ character and a close bracket ] character. The set excludes those characters if the first character after the open bracket is a circumflex ^. To include a close bracket in the set, make it the first character after the open bracket or the circumflex; any other position will end the set. The hyphen character - is also special; when placed between two other characters, it adds all intervening characters to the set. To include a hyphen, make it the last character before the final close bracket. For instance, `[^]0-9-]' means the set `everything except close bracket, zero through nine, and hyphen'. The string ends with the appearance of a character not in the (or, with a circumflex, in) set or when the field width runs out.
--
자본주의, 자유민주주의 사회에서는 결국 자유마저 돈으로 사야하나보다.
사줄테니 제발 팔기나 해다오. 아직 내가 "사겠다"고 말하는 동안에 말이다!
댓글 달기