文件搜索,並返回關鍵字所在行及內容

1.根據關鍵字,進行文件內容的搜索,並返回包含關鍵字的第一行內容以及行號。文件內容建議是utf-8格式,避免中文亂碼問題。java public static JSONObject isContainContent(File pathname,String keyWord){ JSONObject jsonObject = new JSONObject(); boo
相關文章
相關標籤/搜索