Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ndegwamartin committed Sep 28, 2023
1 parent fd7c3b8 commit a00cbfd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/org/smartregister/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

import org.apache.commons.lang3.StringUtils;

import static org.smartregister.utils.Constants.SLASH_UNDERSCORE;

public class Utils {
public static String cleanIdString(String idString) {
if (StringUtils.isNotBlank(idString) && idString.contains(SLASH_UNDERSCORE)) {
idString = idString.substring(0, idString.indexOf(SLASH_UNDERSCORE));
}
return idString;
return StringUtils.isNotBlank(idString) && idString.contains(Constants.SLASH_UNDERSCORE) ?
idString.substring(0, idString.indexOf(Constants.SLASH_UNDERSCORE)) : idString;
}
}

0 comments on commit a00cbfd

Please sign in to comment.