public static StringInfo fromString(String s) {
		s = Objects.requireNonNullElse(s, "");
		EnumSet<UnicodeScript> scripts = EnumSet.noneOf(UnicodeScript.class);
		EnumSet<StringInfoFeature> features = EnumSet.noneOf(StringInfoFeature.class);

		s.codePoints().forEach(codePoint -> {
			try {
				UnicodeScript script = Character.UnicodeScript.of(codePoint);
				if (script == UnicodeScript.UNKNOWN) {
					features.add(StringInfoFeature.CODEC_ERROR); // TODO: are we mis-using this enum to signal bad character?
				}
				else {
					scripts.add(script);
				}

				if (codePoint == StringUtilities.UNICODE_REPLACEMENT) {
					features.add(StringInfoFeature.CODEC_ERROR);
				}
				if ((codePoint < 32 && !STD_CTRL_CHARS.contains((char) codePoint)) ||
					!Character.isDefined(codePoint)) {
					features.add(StringInfoFeature.NON_STD_CTRL_CHARS);
				}
			}
			catch (IllegalArgumentException e) {
				// ignore this codepoint
			}
		});
		return new StringInfo(s, scripts, features);
	}
Creates a {@link StringInfo} instance

@param s string
@return new {@link StringInfo} instance
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/StringInfo.java