{
    "Function": "sliceBytes",
    "File": "src/BytesHelper.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function sliceBytes(bytes memory toSlice, uint256 start, uint256 end)\n        public\n        pure\n        returns (bytes memory)\n    {\n        require(\n            start < toSlice.length,\n            \"Start index is greater than the length of the byte string\"\n        );\n        require(\n            end <= toSlice.length,\n            \"End index is greater than the length of the byte string\"\n        );\n        require(start < end, \"Start index not less than end index\");\n\n        uint256 length = end - start;\n        bytes memory sliced = new bytes(length);\n\n        for (uint256 i = 0; i < length; i++) {\n            sliced[i] = toSlice[i + start];\n        }\n\n        return sliced;\n    }"
}