Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import java.util.ArrayList; import java.util.List; public class Main { private static final String CORE_PREFIX = "Core_"; private static final String FAE_PREFIX = "FAE_"; /** * Get a list of all saved characters names. */ public static List<String> listCharacterNames(Context context) { List<String> names = new ArrayList<>(); for (String name : context.fileList()) { if (name.startsWith(CORE_PREFIX)) { names.add(name.replace(CORE_PREFIX, "")); } else if (name.startsWith(FAE_PREFIX)) { names.add(name.replace(FAE_PREFIX, "")); } } return names; } }