-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To Path #17
Comments
At this time there is, unfortunately, no way to manually split text based on a character that isn't space, hyphen, or underscore. You can produce text with whatever delimiter you want, as you've done here. This is a good feature idea. It will require extending boundary to include an option like "character(char)", which can include space, hyphen, underscore, periods, whatever. If this were the case, then you could create a converter, set the boundaries to include exactly the dot character, and then convert by delimiting with slash. For now, my best suggestion is if you are just splitting on dots as you would in a domain, then don't use my library for that part.
When you set the pattern with converter, it describes how the text at the end will be formatted. By setting the pattern to Camel, you would get I would like to keep this issue open and close when the feature to split on any character has been fully investigated. |
I'm doing a lot more than splitting on dots. I think I didn't use the pattern to lowercase because it didn't split the words where I wanted it to or something. I could give it a go again just to see why. Probably had something to do with either where numbers split or where words disappeared... Although, I might be missing exactly what you're saying there. You might want to consider being able to do multiple characters. I know Perl5 (which I don't do anymore), uses |
ok, I hardly know rust at all
the goal is (hopefully) to obviously convert a java package to a path. java packages (by convention) are all prefixed with a reverse domain. So my domain
com.xenoterracide
input, should end up ascom/xenoterracide
which will then be passed tomkdir
, this sadly doesn't seem to work. If I don't input a dot it usually seems to work as expected. Probably just going to do a.
replace, but seems like maybe a good feature (PathCase), but in general not the behavior I would expect from Pattern::Camel.https://github.com/xenoterracide/brix/blob/main/crates/brix_processor/src/helpers/basic.rs#L119
The text was updated successfully, but these errors were encountered: