This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kasra.picker.utils; | |
import java.util.GregorianCalendar; | |
import java.util.TimeZone; | |
public class PersianCalendar extends GregorianCalendar { | |
private static final long serialVersionUID = 5541422440580682494L; | |
private int persianYear; | |
private int persianMonth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun findPartners(key: String, arr: Array<String>): Unit { | |
var name = key.substring(0, key.lastIndexOf('_')) | |
val regex = Regex(name + "_[0-9]+") | |
arr.forEach { s -> | |
if (regex.containsMatchIn(s)) { | |
println(s) | |
} | |
} | |
} |