1234567891011121314151617 |
- /*
- * Nextcloud - Android Client
- *
- * SPDX-FileCopyrightText: 2024 Your Name <your@email.com>
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
- package com.nextcloud.utils.extensions
- fun String.getRandomString(length: Int): String {
- val allowedChars = ('A'..'Z') + ('a'..'z') + ('0'..'9')
- val result = (1..length)
- .map { allowedChars.random() }
- .joinToString("")
- return this + result
- }
|