SqueakByExample:A.2

From 흡혈양파의 번역工房
Revision as of 08:15, 18 August 2012 by Onionmixer (talk | contribs) (SBE A.2 페이지 추가)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A.2 Collections

FAQ 3
어떻게 OrderedCollection을 정렬하나요?

Answer
asSortedCollection에 다음 메세지를 보냅니다

#(7 2 6 1) asSortedCollection        a SortedCollection(1 2 6 7)


FAQ 4
어떻게하면 문자collection 을 스트링으로 변환할 수 있나요?

Answer

String streamContents: [:str | str nextPutAll: 'hello' asSet]        'hleo'

Notes