[Swift] prefix

Han's·2023년 7월 21일
0

TIL

목록 보기
5/20
post-thumbnail

prefix의 종류 4가지


  1. prefix(maxLength:)
    maxLength가 0보다 커야 합니다!

  2. prefix(while:)
    특정 조건까지 출력되는 것을 볼 수 있습니다.

  3. prefix(upTo:)
    여기서 주의할 점은 upTo에는 Index가 들어갑니다.


  4. prefix(through:)
    마찬가지로 Index가 들어갑니다.
    through는 포함입니다.
profile
 iOS Developer

0개의 댓글