title: Need hibernate function that returns the index of a substring
body: <p>I want a function in hibernate that returns the index of a specified substring, i will use that index in <code>substring</code> function, for example consider this hibernate query:</p>
  
  <pre><code>from PersonObject m where substring(m.description,44,4) BETWEEN :minnum and :maxnum
  </code></pre>
  
  <p>i want to use the requested function instead of the start index <code>44</code> to dynamically get the start index as this position varies for one string to another </p>