Publishers.TryDropWhile

μ œλ„€λ¦­ ꡬ쑰체 | μ—λŸ¬λ₯Ό λ˜μ§€λŠ” 주어진 ν΄λ‘œμ €κ°€ falseλ₯Ό λ°˜ν™˜ν•  λ•ŒκΉŒμ§€ μƒμœ„μ— 흐λ₯΄λŠ” Publisherλ‘œλΆ€ν„° μš”μ†Œλ₯Ό μƒλž΅ν•˜λŠ” Publisher

μ΄λ‹ˆμ…œλΌμ΄μ €λŠ” 두 개의 인자λ₯Ό λ°›λŠ”λ‹€.

  • upstream : μƒμœ„μ— 흐λ₯΄λŠ” Publisher

  • predicate : μš”μ†Œμ˜ μƒλž΅ μ—¬λΆ€λ₯Ό κ²°μ •ν•˜λŠ” μ—λŸ¬λ₯Ό λ˜μ§€λŠ” ν΄λ‘œμ €

tryDrop μ˜€νΌλ ˆμ΄ν„°μ™€ 관련이 μžˆλ‹€.

Publishers.DropWhile의 λ™μž‘κ³Ό κ°™μœΌλ‚˜ λ™μž‘μ„ μˆ˜ν–‰ν•˜λ‹€κ°€ μ—λŸ¬λ₯Ό λ‚Ό 수 μžˆλ‹€λŠ” 차이가 μžˆλ‹€.

RxSwift

skipWhile μ˜€νΌλ ˆμ΄ν„°λ₯Ό μ‚¬μš©ν•˜μ—¬ κ΅¬ν˜„ν•  수 μžˆλ‹€.

ReactiveSwift

ν•΄λ‹Ή λ™μž‘μ„ κ΅¬ν˜„ν•˜κΈ° μœ„ν•œ μ˜€νΌλ ˆμ΄ν„°λ₯Ό μ œκ³΅ν•˜μ§€ μ•ŠλŠ”λ‹€.

μ°Έκ³ 

ReactiveX - Operators - Skip

Publishers.DropWhile

Last updated