This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************** | |
* | |
* Created by menion | |
* Copyright (c) 2019. All rights reserved. | |
* | |
* This file is part of the Asamm team software. | |
* | |
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | |
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Extracts substring of preferred language from multilingual string.<br/> | |
* Example multilingual string: "Base\ren\bEnglish\rjp\bJapan\rzh_py\bPin-yin". | |
* <p/> | |
* Use '\r' delimiter among names and '\b' delimiter between each language and name. | |
*/ | |
private String extract(String s) { | |
// check string | |
if (s == null || s.trim().isEmpty()) { | |
return null; |