Sources.pudu
1/** @Log.Domain.Sources.Module — source context prefixes and their ordering */2module PuduLangLog.Domain.Sources34/// Whether a source context is the prefix or lies beneath it, `App.Web` covering `App.Web.Api`5/// but not `App.Website`, ignoring case.6export fn covers(prefix: Str, source: Str) -> Bool { beneath(prefix.toLower(), source.toLower()) }78/// Whether a source context is the prefix or lies beneath it, with case significant.9export fn beneath(prefix: Str, source: Str) -> Bool {10 if !source.startsWith(prefix) { return false }11 source.length() == prefix.length() || source.slice(prefix.length(), prefix.length() + 1) == "."12}13