mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2026-01-28 14:44:34 +01:00
Subnet command (#17)
* Started working on subnets * Basic version of the subnet command * Improved subnet command * almost done with subnets * improve positioning
This commit is contained in:
12
src/core/utils.tsx
Normal file
12
src/core/utils.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
function chunkifyString(input: string, chunkSize: number) : string[] {
|
||||
|
||||
const result : string[] = [];
|
||||
for(var i=0;i<input.length;i+=chunkSize) {
|
||||
const size = Math.min(chunkSize, input.length-i);
|
||||
result.push(input.substr(i, size));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
export {chunkifyString};
|
||||
Reference in New Issue
Block a user