MCPcopy Create free account
hub / github.com/cloudfoundry/java-buildpack / isRubySafeChar

Function isRubySafeChar

src/java/frameworks/java_opts.go:228–242  ·  view source on GitHub ↗

isRubySafeChar checks if a character is in Ruby's safe set: A-Za-z0-9_-.,:/@\n$\ Note: '=' is NOT safe and will be escaped

(ch rune)

Source from the content-addressed store, hash-verified

226// isRubySafeChar checks if a character is in Ruby's safe set: A-Za-z0-9_-.,:/@\n$\
227// Note: '=' is NOT safe and will be escaped
228func isRubySafeChar(ch rune) bool {
229 return (ch >= 'A' && ch <= 'Z') ||
230 (ch >= 'a' && ch <= 'z') ||
231 (ch >= '0' && ch <= '9') ||
232 ch == '_' ||
233 ch == '-' ||
234 ch == '.' ||
235 ch == ',' ||
236 ch == ':' ||
237 ch == '/' ||
238 ch == '@' ||
239 ch == '\n' ||
240 ch == '$' ||
241 ch == '\\'
242}
243
244// loadConfig loads the java_opts.yml configuration
245func (j *JavaOptsFramework) loadConfig() (*JavaOptsConfig, error) {

Callers 1

escapeValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected