BookUtil.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:civcraft 作者:
public static void linePageinate(BookMeta meta, ArrayList<String> lines) {
    /*
     * 13 writeable lines per page, iterate through each line
     * and place into the page, when the line count equals 14
     * set it back to 0 and add page.
     */

    int count = 0;
    String page = "";
    for (String line : lines) {
        count++;
        if (count > LINES_PER_PAGE) {
            meta.addPage(page);
            count = 0;
            page = "";
        }
        page += line+"\n";          
    }

    meta.addPage(page);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号