Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Base64{
- public static int getBase64ByteSize(String str){
- long occurences = str.chars().filter(c -> c =='ä' ).count();
- System.out.println(occurences);
- int n = str.length() + (int)occurences;
- int z = 4 * (int) Math.ceil( (double) n/3);
- return z;
- }
- public static void main(String[] args){
- System.out.println(getBase64ByteSize("Hätte"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment