code: @Nonnegative
    public static int getTrailingCharCount (@Nullable final String s, final char c)
    {
      int ret = 0;
      if (s != null)
      {
        int nLast = s.length () - 1;
        while (nLast >= 0 && s.charAt (nLast) == c)
        {
          ++ret;
          --nLast;
        }
      }
      return ret;
    }
docs: Get the number of specified chars, the passed string ends with.
  
  @param s
  The string to be parsed. May be <code>null</code>.
  @param c
  The char to be searched.
  @return Always &ge; 0.