package com.google.android.gms.common.util;

import android.text.TextUtils;
import com.google.android.gms.common.annotation.KeepForSdk;
import defpackage.qm2;
import defpackage.rq6;
import java.util.regex.Pattern;

/* JADX INFO: loaded from: classes2.dex */
@KeepForSdk
public class Strings {
    private static final Pattern zza = Pattern.compile("\\$\\{(.*?)\\}");

    private Strings() {
    }

    @rq6
    @KeepForSdk
    public static String emptyToNull(@rq6 String str) {
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        return str;
    }

    @KeepForSdk
    @qm2
    public static boolean isEmptyOrWhitespace(@rq6 String str) {
        return str == null || str.trim().isEmpty();
    }
}
