Adobe interview question

1. String Manipulation based on IP address and Subnet Mask