From 20f52068cb02db11c4dfe9f2cd87fce8a4366501 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Fri, 15 Mar 2024 18:09:22 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=B0=EA=B4=80=EC=9E=A5=20=EB=B0=98?= =?UTF-8?q?=ED=99=98=20=ED=95=A8=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/fims/mngt/FactionUtil.java | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/main/java/cokr/xit/fims/mngt/FactionUtil.java b/src/main/java/cokr/xit/fims/mngt/FactionUtil.java index ff389319..fb0a7b27 100644 --- a/src/main/java/cokr/xit/fims/mngt/FactionUtil.java +++ b/src/main/java/cokr/xit/fims/mngt/FactionUtil.java @@ -7,32 +7,26 @@ public class FactionUtil { return splitString[splitString.length-1]; } - public static String getInstituteLeader(String instNm, boolean person) { + public static String getInstituteLeader(String instNm, boolean lastChar) { String result = ""; - if(person) { - if(instNm.endsWith("시청") || instNm.endsWith("군청")) { - result = instNm.substring(0, instNm.length()-1); - } else if(instNm.endsWith("구")) { - result = instNm+"청"; - } else { - result = instNm; - } - - if(result.endsWith("군")){ - result += "수"; - } else { - result += "장"; - } + if(instNm.endsWith("시청") || instNm.endsWith("군청")) { + result = instNm.substring(0, instNm.length()-1); + } else if(instNm.endsWith("구")) { + result = instNm+"청"; } else { + result = instNm; + } - if(instNm.endsWith("시") || instNm.endsWith("군") || instNm.endsWith("구")) { - result = instNm+"청"; - } else { - result = instNm; - } + if(result.endsWith("군")){ + result += "수"; + } else { + result += "장"; + } + if(!lastChar) { + result = result.substring(0, result.length()-1); } return result;