11 deleted 2 characters in body
source | link

Java 215 211 207 202 200 199 198 190 181180 bytes

Long k,c;boolean a(String i,String s){return(b(i)^b(s))>>32-k.decode(s.split("/")[1])==0;}long b(String i){for(c=k=0l;c<4;k+=k.decode(i.split("[./]")[3+(int)-c])<<8l*c++<<8*c++);return k;}

Outputs true for truthy and false for falsy.

Note: This uses long instead of int for the potential right shift of 32.

Try it online!Try it online!

Saved 1 byte thanks to ceilingcat

Saved 910 bytes thanks to Peter Cordes

Java 215 211 207 202 200 199 198 190 181 bytes

Long k,c;boolean a(String i,String s){return(b(i)^b(s))>>32-k.decode(s.split("/")[1])==0;}long b(String i){for(c=k=0l;c<4;k+=k.decode(i.split("[./]")[3+(int)-c])<<8l*c++);return k;}

Outputs true for truthy and false for falsy.

Note: This uses long instead of int for the potential right shift of 32.

Try it online!

Saved 1 byte thanks to ceilingcat

Saved 9 bytes thanks to Peter Cordes

Java 215 211 207 202 200 199 198 190 180 bytes

Long k,c;boolean a(String i,String s){return(b(i)^b(s))>>32-k.decode(s.split("/")[1])==0;}long b(String i){for(c=k=0l;c<4;k+=k.decode(i.split("[./]")[3+(int)-c])<<8*c++);return k;}

Outputs true for truthy and false for falsy.

Note: This uses long instead of int for the potential right shift of 32.

Try it online!

Saved 1 byte thanks to ceilingcat

Saved 10 bytes thanks to Peter Cordes

10 added 11 characters in body
source | link

Java 215 211 207 202 200 199 198 190 190181 bytes

IntegerLong a,k,c;boolean a(String i,String s){a=kreturn(b(i)^b(s))>>32-k.decode(s.split("/")[1]);return(b(i)&(a<1?0:~0<<32-a))==b(s);==0;}intlong b(String i){for(c=k=0;c<4;k+=kc=k=0l;c<4;k+=k.decode(i.split("[./]")[3[3+(int)-c])<<8*c++<<8l*c++);return k;}

Outputs true for truthy and false for falsy. This can probably be golfed more...  

Fun noteNote: The ternary checking to see if the netmask is 0This uses a<1?0:~0<<32-a;long is required because Java cannot leftinstead of int for the potential right shift of 32.

Try it online!Try it online!

Saved 1 byte thanks to ceilingcat

Saved 9 bytes thanks to Peter Cordes

Java 215 211 207 202 200 199 198 190 bytes

Integer a,k,c;boolean a(String i,String s){a=k.decode(s.split("/")[1]);return(b(i)&(a<1?0:~0<<32-a))==b(s);}int b(String i){for(c=k=0;c<4;k+=k.decode(i.split("[./]")[3-c])<<8*c++);return k;}

Outputs true for truthy and false for falsy. This can probably be golfed more...  

Fun note: The ternary checking to see if the netmask is 0 a<1?0:~0<<32-a; is required because Java cannot left shift 32.

Try it online!

Saved 1 byte thanks to ceilingcat

Java 215 211 207 202 200 199 198 190 181 bytes

Long k,c;boolean a(String i,String s){return(b(i)^b(s))>>32-k.decode(s.split("/")[1])==0;}long b(String i){for(c=k=0l;c<4;k+=k.decode(i.split("[./]")[3+(int)-c])<<8l*c++);return k;}

Outputs true for truthy and false for falsy.

Note: This uses long instead of int for the potential right shift of 32.

Try it online!

Saved 1 byte thanks to ceilingcat

Saved 9 bytes thanks to Peter Cordes

9 Swapping return type to boolean to satisfy spirit of the challenge
source | link

Java 215 211 207 202 200 199 198 185190 bytes

Integer a,k,c;intc;boolean a(String i,String s){a=k.decode(s.split("/")[1]);return(b(i)&(a<1?0:~0<<32-a))-b==b(s);}int b(String i){for(c=k=0;c<4;k+=k.decode(i.split("[./]")[3-c])<<8*c++);return k;}

Outputs '0'true for truthy. Anything else is and false for falsy. This can probably be golfed more...

Fun note: The ternary checking to see if the netmask is 0 a<1?0:~0<<32-a; is required because Java cannot left shift 32.

Try it online!Try it online!

Saved 1 byte thanks to ceilingcat

Java 215 211 207 202 200 199 198 185 bytes

Integer a,k,c;int a(String i,String s){a=k.decode(s.split("/")[1]);return(b(i)&(a<1?0:~0<<32-a))-b(s);}int b(String i){for(c=k=0;c<4;k+=k.decode(i.split("[./]")[3-c])<<8*c++);return k;}

Outputs '0' for truthy. Anything else is falsy. This can probably be golfed more...

Fun note: The ternary checking to see if the netmask is 0 a<1?0:~0<<32-a; is required because Java cannot left shift 32.

Try it online!

Saved 1 byte thanks to ceilingcat

Java 215 211 207 202 200 199 198 190 bytes

Integer a,k,c;boolean a(String i,String s){a=k.decode(s.split("/")[1]);return(b(i)&(a<1?0:~0<<32-a))==b(s);}int b(String i){for(c=k=0;c<4;k+=k.decode(i.split("[./]")[3-c])<<8*c++);return k;}

Outputs true for truthy and false for falsy. This can probably be golfed more...

Fun note: The ternary checking to see if the netmask is 0 a<1?0:~0<<32-a; is required because Java cannot left shift 32.

Try it online!

Saved 1 byte thanks to ceilingcat

8 deleted 12 characters in body
source | link
7 added 100 characters in body
source | link
6 deleted 1 character in body
source | link
5 added 1 character in body
source | link
4 added 6 characters in body
source | link
3 added 5 characters in body
source | link
2 added 97 characters in body
source | link
1
source | link