add String Length To 16 - Android java.lang

Android examples for java.lang:String

Description

add String Length To 16

Demo Code

import android.content.Context;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class Main{


    public static String addStrLenTo16(String str) {
        for (int i = str.getBytes().length; i < 16; i++) {
            str += '\0';
        }/*from   w ww. ja  v  a 2s. co m*/
        android.util.Log.e("alkdsf", "sdklf");
        return str;
    }

}

Related Tutorials