Reset the range from the given left and right with same tag match way
'N': NEXT, 'E': LAST, 'R': NOLEFT, 'L': NORIGHT

@param left
@param right
@param sameTagMatch
@return
13286
protected Betner between(String left, String right, Character sameTagMatch) {
		return inrange(left, right, sameTagMatch);
	}
407366
def is_same_nick(self, left, right):
        
        return self.normalize(left) == self.normalize(right)
18583
@Override
  final protected void addRangeEmpty(int left, int right) {
    String key = left + "_" + right;
    if (index.containsKey(key)) {
      // do nothing (empty...)
    } else {
      root = addRange(root, left, right, null);
      root.color = IntervalRBTreeNode.BLACK;
    }
  }
1179743
@Deprecated
    public static int matchAfter(CharSequence a, CharSequence b, int aIndex, int bIndex) {
        int i = aIndex, j = bIndex;
        int alen = a.length();
        int blen = b.length();
        for (; i < alen && j < blen; ++i, ++j) {
            char ca = a.charAt(i);
            char cb = b.charAt(j);
            if (ca != cb) {
                break;
            }
        }
        // if we failed a match make sure that we didn't match half a character
        int result = i - aIndex;
        if (result != 0 && !onCharacterBoundary(a, i) && !onCharacterBoundary(b, j)) {
            --result; // backup
        }
        return result;
    }
167917
public static <T extends Comparable<? super T>> ComparisonChain compare(T left, T right) {
        return new ComparisonChain().compare(left, right);
    }
267619
public static IsLessThan isLessThan(ComparableExpression<Number> left, ComparableExpression<Number> right) {
        return new IsLessThan(left, right);
    }
905173
public Tag getTagForPattern(CharSequence text) {
		for (final Tag tag : Tag.values()) {
			Pattern pattern = this.compiledPatterns.get(tag);
			if (pattern == null) {
				pattern = Pattern.compile("^\\s*" + getPattern(tag), Pattern.DOTALL); //$NON-NLS-1$
				this.compiledPatterns.put(tag, pattern);
			}
			final Matcher matcher = pattern.matcher(text);
			if (matcher.find()) {
				return tag;
			}
		}
		return null;
	}
259676
static String formatMultipleSynthesis(String[] matches,
      String leftSide, String rightSide) {
    String errorMessage;
    String suggestionLeft = "";
    String suggestionRight = "";
    String rightSideNew = rightSide;
    int sPos = leftSide.lastIndexOf(SUGGESTION_START_TAG);
    if (sPos >= 0) {
      suggestionLeft = leftSide.substring(sPos + SUGGESTION_START_TAG.length());
    }
    if (StringTools.isEmpty(suggestionLeft)) {
      errorMessage = leftSide;
    } else {
      errorMessage = leftSide.substring(0, leftSide.lastIndexOf(SUGGESTION_START_TAG)) + SUGGESTION_START_TAG;
    }
    int rPos = rightSide.indexOf(SUGGESTION_END_TAG);
    if (rPos >= 0) {
      suggestionRight = rightSide.substring(0, rPos);
    }
    if (!StringTools.isEmpty(suggestionRight)) {
      rightSideNew = rightSide.substring(rightSide.indexOf(SUGGESTION_END_TAG));
    }
    int lastLeftSugEnd = leftSide.indexOf(SUGGESTION_END_TAG);
    int lastLeftSugStart = leftSide.lastIndexOf(SUGGESTION_START_TAG);
    StringBuilder sb = new StringBuilder();
    sb.append(errorMessage);
    for (int z = 0; z < matches.length; z++) {
      sb.append(suggestionLeft);
      sb.append(matches[z]);
      sb.append(suggestionRight);
      if (z < matches.length - 1 && lastLeftSugEnd < lastLeftSugStart) {
        sb.append(SUGGESTION_END_TAG);
        sb.append(", ");
        sb.append(SUGGESTION_START_TAG);
      }
    }
    sb.append(rightSideNew);
    return sb.toString();
  }
994592
public void setWindowPaddingTopRightBottomLeft(final int top, final int right,
            final int bottom, final int left) {
        JsArrayNumber array = JavaScriptObject.createArray(4).cast();
        array.push(top);
        array.push(right);
        array.push(bottom);
        array.push(left);
        attrMixin.setAttribute(WINDOW_PADDING, JsonUtils.stringify(array));
    }
694041
public static MaybeAssignedSet join(MaybeAssignedSet left, MaybeAssignedSet right) {
		if (left == null && right == null) {
			return null;
		} else if (left == null) {
			return right;
		} else if (right == null) {
			return left;
		} else {
			return left.join(right);
		}
	}
60941
@Override
    public int matches(Replaceable text,
                       int[] offset,
                       int limit,
                       boolean incremental) {
        // Note (1): We process text in 16-bit code units, rather than
        // 32-bit code points.  This works because stand-ins are
        // always in the BMP and because we are doing a literal match
        // operation, which can be done 16-bits at a time.
        int i;
        int[] cursor = new int[] { offset[0] };
        if (limit < cursor[0]) {
            // Match in the reverse direction
            for (i=pattern.length()-1; i>=0; --i) {
                char keyChar = pattern.charAt(i); // OK; see note (1) above
                UnicodeMatcher subm = data.lookupMatcher(keyChar);
                if (subm == null) {
                    if (cursor[0] > limit &&
                        keyChar == text.charAt(cursor[0])) { // OK; see note (1) above
                        --cursor[0];
                    } else {
                        return U_MISMATCH;
                    }
                } else {
                    int m =
                        subm.matches(text, cursor, limit, incremental);
                    if (m != U_MATCH) {
                        return m;
                    }
                }
            }
            // Record the match position, but adjust for a normal
            // forward start, limit, and only if a prior match does not
            // exist -- we want the rightmost match.
            if (matchStart < 0) {
                matchStart = cursor[0]+1;
                matchLimit = offset[0]+1;
            }
        } else {
            for (i=0; i<pattern.length(); ++i) {
                if (incremental && cursor[0] == limit) {
                    // We've reached the context limit without a mismatch and
                    // without completing our match.
                    return U_PARTIAL_MATCH;
                }
                char keyChar = pattern.charAt(i); // OK; see note (1) above
                UnicodeMatcher subm = data.lookupMatcher(keyChar);
                if (subm == null) {
                    // Don't need the cursor < limit check if
                    // incremental is true (because it's done above); do need
                    // it otherwise.
                    if (cursor[0] < limit &&
                        keyChar == text.charAt(cursor[0])) { // OK; see note (1) above
                        ++cursor[0];
                    } else {
                        return U_MISMATCH;
                    }
                } else {
                    int m =
                        subm.matches(text, cursor, limit, incremental);
                    if (m != U_MATCH) {
                        return m;
                    }
                }
            }
            // Record the match position
            matchStart = offset[0];
            matchLimit = cursor[0];
        }

        offset[0] = cursor[0];
        return U_MATCH;
    }
1199850
public static void setLeft(Element element, int left) {
		if (Dom.isIE()) { // Limitation in IE8...
			while (left > 1000000) {
				left -= 1000000;
			}
			while (left < -1000000) {
				left += 1000000;
			}
		}
		Dom.setStyleAttribute(element, "left", left + "px");
	}
691877
public static Object mult(Object left, Object right) {
        return InfixOpNode.mult(left, right, null);
    }
3792
private static function doOperation( $token, $left, $right ) {
		if ( in_array( $token, [ 'in', 'not-in', 'within', 'not-within' ] ) ) {
			if ( !$right instanceof Range ) {
				$right = new Range( $right );
			}
		}
		switch ( $token ) {
			case 'or':
				return $left || $right;
			case 'and':
				return $left && $right;
			case 'is':
				return $left == $right;
			case 'is-not':
				return $left != $right;
			case 'in':
				return $right->isNumberIn( $left );
			case 'not-in':
				return !$right->isNumberIn( $left );
			case 'within':
				return $right->isNumberWithin( $left );
			case 'not-within':
				return !$right->isNumberWithin( $left );
			case 'mod':
				if ( is_int( $left ) ) {
					return (int)fmod( $left, $right );
				}

				return fmod( $left, $right );
			case ',':
				if ( $left instanceof Range ) {
					$range = $left;
				} else {
					$range = new Range( $left );
				}
				$range->add( $right );

				return $range;
			case '..':
				return new Range( $left, $right );
			default:
				throw new Error( "Invalid RPN token" );
		}
	}
396770
function rangeFromMatch(match) {
        var wrappers = getWrappersByIndex(indexOf(match));

        var rng = editor.dom.createRng();
        rng.setStartBefore(wrappers[0]);
        rng.setEndAfter(wrappers[wrappers.length - 1]);

        return rng;
      }
360911
public static Betner betnLast(String target, String leftSameWithRight) {
		return betn(target).betweenLast(leftSameWithRight);
	}
785321
public InclusMultiPos<S, String, String> setBefore(String right) {
		return new InclusMultiPos<S, String, String>(right, right) {
			
			@Override protected S result() {
				return delegateQueue('B', left, right, pos, position, inclusive, plusminus, filltgt);
			}
		};
	}