반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- string
- dataframe
- array
- hive
- Tkinter
- numpy
- Apache
- math
- Excel
- 파이썬
- gas
- google apps script
- Kotlin
- Google Spreadsheet
- matplotlib
- Google Excel
- list
- Redshift
- PySpark
- django
- GIT
- Github
- PostgreSQL
- Java
- Presto
- SQL
- Python
- c#
- PANDAS
Archives
- Today
- Total
목록repeat (2)
달나라 노트
Google Apps Script : repeat (문자열 반복하기)
String 객체의 repeat method는 문자열을 원하는 횟수만큼 반복된 문자열을 return해줍니다. Syntax String.repeat(n) repeat method는 String에 적용할 수 있으며 1개의 parameter를 받습니다. - n String을 몇번 반복할지에 대한 횟수를 의미합니다. function myFunction(){ var test_string = 'Apple'; Logger.log(test_string.repeat(5)); } -- Result AppleAppleAppleAppleApple test_string에 repeat을 적용했습니다. parameter로 5가 주어졌으니 test_string을 5번 반복한 문자열을 return하라는 의미입니다. 따라서 Apple이..
Google Apps Script
2022. 12. 1. 21:38
Kotlin - repeat (특정 문자열 n번 반복하기)
repeat 함수는 어떤 문자열을 주어진 횟수만큼 반복합니다. 또는 어떤 함수를 주어진 횟수만큼 반복하게 되죠. fun main() { println("A".repeat(5)) // 1 repeat(5) { // 2 print("B") } } -- Result AAAAA BBBBB 1. A라는 문자열을 5번 반복하여 이어붙입니다. 따라서 AAAAA가 출력됩니다. 2. B라는 문자열을 출력하는 print("B") 함수를 5번 실행합니다.
Kotlin
2021. 3. 16. 03:04