title: Minimum Rotations Required Get String
signature: function minimumRotationsRequiredGetString(str) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return convertToString(actual)===convertToString(expected);
  }
  
  function driver(str, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(str),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver("vdevdNdQSopPtj", 14);
    console.log(`TEST-0...${result}`);
  
    result = driver("5", 1);
    console.log(`TEST-1...${result}`);
  
    result = driver("100010101011", 12);
    console.log(`TEST-2...${result}`);
  
    result = driver("tlDOvJHAyMllu", 13);
    console.log(`TEST-3...${result}`);
  
    result = driver("06", 2);
    console.log(`TEST-4...${result}`);
  
    result = driver("101", 3);
    console.log(`TEST-5...${result}`);
  
    result = driver("DYgtU", 5);
    console.log(`TEST-6...${result}`);
  
    result = driver("4", 1);
    console.log(`TEST-7...${result}`);
  
    result = driver("00", 2);
    console.log(`TEST-8...${result}`);
  
    result = driver("Dt", 2);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    main();
  }
source_py: def minimum_rotations_required_get_string(str):
      tmp = (str + str)
      n = len(str)
      for i in range(1, (n + 1)):
          substring = tmp[i:n]
          if (str == substring):
              return i
      return n
source_cpp: int minimum_rotations_required_get_string(string str) {
    string tmp = str + str;
    int n = str . length ( );
    for ( int i = 1;
    i <= n;
    i ++ ) {
      string substring = tmp . substr ( i, str . size ( ) );
      if ( str == substring ) return i;
    }
    return n;
  }