We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 46983c6 + e36d104 commit 4b2fcc4Copy full SHA for 4b2fcc4
src/strings.sol
@@ -42,9 +42,9 @@ library strings {
42
uint _ptr;
43
}
44
45
- function memcpy(uint dest, uint src, uint len) private pure {
+ function memcpy(uint dest, uint src, uint length) private pure {
46
// Copy word-length chunks while possible
47
- for(; len >= 32; len -= 32) {
+ for(; length >= 32; length -= 32) {
48
assembly {
49
mstore(dest, mload(src))
50
@@ -54,8 +54,8 @@ library strings {
54
55
// Copy remaining bytes
56
uint mask = type(uint).max;
57
- if (len > 0) {
58
- mask = 256 ** (32 - len) - 1;
+ if (length > 0) {
+ mask = 256 ** (32 - length) - 1;
59
60
61
let srcpart := and(mload(src), not(mask))
0 commit comments