Java String Between between(String str, String minstr, String maxstr)

Here you can find the source of between(String str, String minstr, String maxstr)

Description

between

License

Apache License

Parameter

Parameter Description
str a parameter
minstr a parameter
maxstr a parameter

Declaration

public static boolean between(String str, String minstr, String maxstr) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//  w w  w  .  ja  v a2 s . c o  m
     *
     * @param str
     * @param minstr
     * @param maxstr
     * @return
     */
    public static boolean between(String str, String minstr, String maxstr) {
        return str.compareTo(minstr) >= 0 && str.compareTo(maxstr) <= 0;
    }
}

Related

  1. between(final String string, final Integer min, final Integer max)
  2. between(String str, String left, String right)
  3. between(String text, String after, String before)
  4. between(String text, String begin, String end)
  5. between(String value, String low, String high)
  6. betweenNonGreedy(String string, String start, String end)