private int findSuffixIndex(StringBuilder buf, int index) {
    int inNestedProperty = 0;
    while (index < buf.length()) {
      if (buf.substring(index, index + propertySuffix.length())
          .equalsIgnoreCase(propertySuffix)) {
        if (inNestedProperty > 0) {
          inNestedProperty--;
          index = index + propertySuffix.length();
        } else {
          return index;
        }
      } else if (buf.substring(index, index + prefixForSuffix.length())
          .equalsIgnoreCase(prefixForSuffix)) {
        inNestedProperty++;
        index = index + prefixForSuffix.length();
      } else {
        index++;
      }
    }
    return -1;
  }
Finds index of suffix in a string from a specified index. Like finds index of "}" in string
"${my.prop.name}" starting from index 2, which is 14.
geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlPropertyResolverHelper.java