toPackageSegment

Best-effort conversion of a file system path segment into a Kotlin package segment.

  • Lowercases

  • Replaces invalid characters with _

  • Prefixes _ if the segment would start with a digit

  • Avoids Kotlin keywords by prefixing stig_

Generated with STIG