Problem
Complete the given apex method to validate the length of an input string. The input string is considered valid only if the number of characters is less than 40.
Instructions:
1. Accept a string parameter as input.
2. If the length of the string is less than or equal to 40 characters, return true.
3. If the length of the string is greater than 40 characters, return false.
Example:
String input = 'Decodeforce';
Boolean result = StringValidateController.validString(input);
// result will be true
Note: String is a primitive data type in apex. Apex provides a set of built in functions to operate on strings. See the official documentation for apex string methods and utilize them to solve this scenario.