Skip to content

Instantly share code, notes, and snippets.

@itsbriany
Created November 29, 2019 23:34
Show Gist options
  • Save itsbriany/2e979ac6aae70bfb0dcb3562c2d93d67 to your computer and use it in GitHub Desktop.
Save itsbriany/2e979ac6aae70bfb0dcb3562c2d93d67 to your computer and use it in GitHub Desktop.
public final int getStat(final char c) {
final String string = PreferenceManager.getDefaultSharedPreferences((Context)this).getString("activity", "");
Intrinsics.checkExpressionValueIsNotNull(string, "act");
final String s = string;
int n;
int n2;
for (int i = n = 0; i < s.length(); ++i, n = n2) {
final boolean b = s.charAt(i) == c;
n2 = n;
if (b) {
n2 = n + 1;
}
}
return n;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment