Back to Type Challenges

README.Ko

questions/00119-medium-replaceall/README.ko.md

latest1.8 KB
Original Source
<!--info-header-start--><h1>ReplaceAll </h1><blockquote><p>by Anthony Fu <a href="https://github.com/antfu" target="_blank">@antfu</a></p></blockquote><p><a href="https://tsch.js.org/119/play/ko" target="_blank"></a> &nbsp;&nbsp;&nbsp;<a href="./README.md" target="_blank"></a> <a href="./README.zh-CN.md" target="_blank"></a> <a href="./README.ja.md" target="_blank"></a> </p><!--info-header-end-->

주어진 문자열 S에서 부분 문자열 From을 찾아 모두 To로 교체하는 제네릭 ReplaceAll<S, From, To>을 구현하세요.

예시:

ts
type replaced = ReplaceAll<'t y p e s', ' ', ''> // expected to be 'types'
<!--info-footer-start-->

<a href="../../README.ko.md" target="_blank"></a> <a href="https://tsch.js.org/119/answer/ko" target="_blank"></a> <a href="https://tsch.js.org/119/solutions" target="_blank"></a> <!--info-footer-end-->