Suggestion about ByteSplicer
See original GitHub issueHi Luke,
May I suggest the ByteSplicer Combine
method accept only byte[]
instead of object[]
as a parameter?
I mention it, because it looks like this method is not ready to use other type of params. That would simplify a little bit your code and avoid potential exception to be thrown
public static byte[] Combine(params byte[] byteArrays)
{
var builder = new ByteArrayBuilder();
foreach (var byteArray in byteArrays)
builder.Append(byteArray);
return builder.ToArray();
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
ByteSplicer.cs
Efficient, Easy to Use Thermal Printing & POS (Windows/Linux/OSX, WiFi/BT/USB/Ethernet) - ESC-POS-.NET/ESCPOS_NET/ByteSplicer.cs at master · lukevp/ESC-POS- ...
Read more >How to save and reuse print buffer? · Issue #72
Write(receipt); var copyOfReceipt = ByteSplicer. ... I was able to save the byte array and reuse it based the method you suggested above....
Read more >c# - Print unicode in ESCPOS_NET
I need to print a Unicode Vietnamese. and my Code: string text = "Phiếu Tính Tiền"; var encoding = System.Text.Encoding.
Read more >Feature #18598: Add String#bytesplice - Ruby master
I withdrew the proposal of String#bytesplice in #13110 because it may cause problems if the specified offset does not land on character boundary....
Read more >Replace loading cutscene with something else..., page 2
bytesplicer: Top idea, those with slow hard drives can 'occupy' themselves during the loading process... I can forsee some people installing ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll update this in the next version, thanks for the feedback!
Hmm, I see… There is sanitation before converting the string to byte[]. And this is going to be different depending on the emitter, is that it?
Yeah, in that case I agree with you