<unclear> #829
-
hello on the following rust playground link I have a function that should split & [u8] to Vec<Vec> delimiter: but if I use this method to split then the result is such that output shows more than one colon in some places of the result and therefore the hasher does not do what I would expect |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Please provide a complete program that I can execute, along with its input, output and desired output. |
Beta Was this translation helpful? Give feedback.
-
here I managed to split split byteslice with regex according to spaces
and use map to CString because I wanted the bytes to be preserved in a
similar form and not converted to utf8 because I will later pass them
to c with ffi but the conversion I did seems slow and therefore I
would like to ask if there is anything else I could transfer to and
that the bytes do not change to utf8
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=351498ffe330daec1ea034d2e9a03bbb
2022-01-15 20:54 GMT+01:00, Andrew Gallant ***@***.***>:
… Please provide a complete program that I can execute, along with its input,
output and desired output.
--
Reply to this email directly or view it on GitHub:
#829 (comment)
You are receiving this because you authored the thread.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
the total function code is hard to make because my program works with
ffi and hashes is not on the playground because there are not all the
crates there so I will try to better explain what I need and if it
doesn't work I will try to create some code again.
at the moment I did this by splitting the data from [u8] into a vector
of cstrings and my question was whether this is a good solution for
storing splitted parts [u8] or is there a faster way to create a
vector of splitted parts
2022-01-16 5:32 GMT+01:00, Andrew Gallant ***@***.***>:
… You didn't actually do what I requested. Please provide a complete program
that I can execute, along with its input, output and desired output.
If you can't fulfill at least that request, then I don't think I can help.
Sorry.
--
Reply to this email directly or view it on GitHub:
#829 (reply in thread)
You are receiving this because you authored the thread.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If this is not possible, I have one more question. is there a way I
could use regex bytes to change string to number u32?
2022-01-16 18:06 GMT+01:00, Andrew Gallant ***@***.***>:
… If you can't reproduce the problem with just the regex crate then the
problem isn't with regexes. Sorry, but I don't know how to help you.
--
Reply to this email directly or view it on GitHub:
#829 (reply in thread)
You are receiving this because you authored the thread.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Please provide a complete program that I can execute, along with its input, output and desired output.