Append incremental '.N' suffix if glyph is a duplicate.
769361
def _unique_name(name, seen):
        """"""
        if name in seen:
            n = seen[name]
            while (name + ".%d" % n) in seen:
                n += 1
            seen[name] = n + 1
            name += ".%d" % n
        seen[name] = 1
        return name
468193
def indent(s, n_spaces=2, initial=True):
    
    i = ' '*n_spaces
    t = s.replace('\n', '\n%s' % i)
    if initial:
        t = i + t
    return t
1016062
function interpolation1(prefix, v0, suffix) {
    var different = bindingUpdated(v0);
    return different ? prefix + stringify$1(v0) + suffix : NO_CHANGE;
}
1315513
public WordBuilder<I> repeatAppend(int num, I symbol) {
        if (num == 0) {
            return this;
        }

        ensureAdditionalCapacity(num);
        if (symbol == null) {
            length += num;
        } else {
            for (int i = num; i > 0; i--) {
                array[length++] = symbol;
            }
        }
        return this;
    }
8544
def _compare_suffix(self, other):
        """"""

        # If suffix is omitted, assume a match
        if not self.suffix or not other.suffix:
            return True

        # Check if more than one unique suffix
        suffix_set = set(self.suffix_list + other.suffix_list)
        unique_suffixes = suffix_set & UNIQUE_SUFFIXES
        for key in EQUIVALENT_SUFFIXES:
            if key in unique_suffixes:
                unique_suffixes.remove(key)
                unique_suffixes.add(EQUIVALENT_SUFFIXES[key])

        return len(unique_suffixes) < 2
31804
function getSuffix(suffix) {
  suffix = (suffix.slice(0, 1) === ' ') ?
    suffix :
    suffix.replace(/.+?(?=\s)/, '');
  suffix = suffix.slice(1, suffix.length);
  return suffix;
}
226053
function patternIdGen(initialID) {
  const splitID = initialID.split('.');
  splitID.shift();
  splitID.unshift('patterns');
  return splitID.join('.');
}
181037
private int appendAffix(StringBuffer buf, boolean isNegative, boolean isPrefix,
                            FieldPosition fieldPosition,
                            boolean parseAttr) {
        if (currencyChoice != null) {
            String affixPat = null;
            if (isPrefix) {
                affixPat = isNegative ? negPrefixPattern : posPrefixPattern;
            } else {
                affixPat = isNegative ? negSuffixPattern : posSuffixPattern;
            }
            StringBuffer affixBuf = new StringBuffer();
            expandAffix(affixPat, null, affixBuf);
            buf.append(affixBuf);
            return affixBuf.length();
        }

        String affix = null;
        String pattern;
        if (isPrefix) {
            affix = isNegative ? negativePrefix : positivePrefix;
            pattern = isNegative ? negPrefixPattern : posPrefixPattern;
        } else {
            affix = isNegative ? negativeSuffix : positiveSuffix;
            pattern = isNegative ? negSuffixPattern : posSuffixPattern;
        }
        // [Spark/CDL] Invoke formatAffix2Attribute to add attributes for affix
        if (parseAttr) {
            // Updates for Ticket 11805.
            int offset = affix.indexOf(symbols.getCurrencySymbol());
            if (offset > -1) {
                formatAffix2Attribute(isPrefix, Field.CURRENCY, buf, offset,
                        symbols.getCurrencySymbol().length());
            }
            offset = affix.indexOf(symbols.getMinusSignString());
            if (offset > -1) {
                formatAffix2Attribute(isPrefix, Field.SIGN, buf, offset,
                        symbols.getMinusSignString().length());
            }
            offset = affix.indexOf(symbols.getPercentString());
            if (offset > -1) {
                formatAffix2Attribute(isPrefix, Field.PERCENT, buf, offset,
                        symbols.getPercentString().length());
            }
            offset = affix.indexOf(symbols.getPerMillString());
            if (offset > -1) {
                formatAffix2Attribute(isPrefix, Field.PERMILLE, buf, offset,
                        symbols.getPerMillString().length());
            }
            offset = pattern.indexOf("¤¤¤");
            if (offset > -1) {
                formatAffix2Attribute(isPrefix, Field.CURRENCY, buf, offset,
                        affix.length() - offset);
            }
        }

        // Look for SIGN, PERCENT, PERMILLE in the formatted affix.
        if (fieldPosition.getFieldAttribute() == NumberFormat.Field.SIGN) {
            String sign = isNegative ? symbols.getMinusSignString() : symbols.getPlusSignString();
            int firstPos = affix.indexOf(sign);
            if (firstPos > -1) {
                int startPos = buf.length() + firstPos;
                fieldPosition.setBeginIndex(startPos);
                fieldPosition.setEndIndex(startPos + sign.length());
            }
        } else if (fieldPosition.getFieldAttribute() == NumberFormat.Field.PERCENT) {
            int firstPos = affix.indexOf(symbols.getPercentString());
            if (firstPos > -1) {
                int startPos = buf.length() + firstPos;
                fieldPosition.setBeginIndex(startPos);
                fieldPosition.setEndIndex(startPos + symbols.getPercentString().length());
            }
        } else if (fieldPosition.getFieldAttribute() == NumberFormat.Field.PERMILLE) {
            int firstPos = affix.indexOf(symbols.getPerMillString());
            if (firstPos > -1) {
                int startPos = buf.length() + firstPos;
                fieldPosition.setBeginIndex(startPos);
                fieldPosition.setEndIndex(startPos + symbols.getPerMillString().length());
            }
        } else
        // If CurrencySymbol or InternationalCurrencySymbol is in the affix, check for currency symbol.
        // Get spelled out name if "¤¤¤" is in the pattern.
        if (fieldPosition.getFieldAttribute() == NumberFormat.Field.CURRENCY) {
            if (affix.indexOf(symbols.getCurrencySymbol()) > -1) {
                String aff = symbols.getCurrencySymbol();
                int firstPos = affix.indexOf(aff);
                int start = buf.length() + firstPos;
                int end = start + aff.length();
                fieldPosition.setBeginIndex(start);
                fieldPosition.setEndIndex(end);
            } else if (affix.indexOf(symbols.getInternationalCurrencySymbol()) > -1) {
                String aff = symbols.getInternationalCurrencySymbol();
                int firstPos = affix.indexOf(aff);
                int start = buf.length() + firstPos;
                int end = start + aff.length();
                fieldPosition.setBeginIndex(start);
                fieldPosition.setEndIndex(end);
            } else if (pattern.indexOf("¤¤¤") > -1) {
                // It's a plural, and we know where it is in the pattern.
                int firstPos = pattern.indexOf("¤¤¤");
                int start = buf.length() + firstPos;
                int end = buf.length() + affix.length(); // This seems clunky and wrong.
                fieldPosition.setBeginIndex(start);
                fieldPosition.setEndIndex(end);
            }
        }

        buf.append(affix);
        return affix.length();
    }
282482
def set_prefix_and_suffix(fmt, notebook, nb_file):
    """"""
    for alt_fmt in long_form_multiple_formats(notebook.metadata.get('jupytext', {}).get('formats')):
        if (alt_fmt['extension'] == fmt['extension']
                and fmt.get('format_name') == alt_fmt.get('format_name')):
            try:
                base_path(nb_file, alt_fmt)
                fmt.update(alt_fmt)
                return
            except InconsistentPath:
                continue
649910
def _make_suffix(cov):
    """"""
    # Check if coverage object has data_suffix:
    if cov and cov.data_suffix is not None:
        # If True, the suffix will be autogenerated by coverage.py.
        # The suffixed data files will be automatically combined later.
        if cov.data_suffix is True:
            return True
        # Has a suffix, but we add our own extension
        return cov.data_suffix + '.nbval'
    return 'nbval'
462478
def strnum(prefix: str, num: int, suffix: str = "") -> str:
    
    return "{}{}{}".format(prefix, num, suffix)
1014206
private void appendDifference(StringBuilder appendTo, Difference difference) {
        appendTo.append(' ').append(difference).append('\n');
    }
1096777
def prefix(rowPrefix):
        """"""
        fp = Range.followingPrefix(rowPrefix)
        return Range(srow=rowPrefix, sinclude=True, erow=fp, einclude=False)
638752
def _increment(self, n=1):
        """"""
        if self._cur_position >= self.num_tokens-1:
            self._cur_positon = self.num_tokens - 1
            self._finished = True
        else:
            self._cur_position += n
1245455
private void addStringInternal(String str)
    {
        String prefixString = determineLongestPrefixInMDAG(str);
        String suffixString = str.substring(prefixString.length());

        //Retrive the data related to the first confluence node (a node with two or more incoming transitions)
        //in the _transition path from sourceNode corresponding to prefixString.
        HashMap<String, Object> firstConfluenceNodeDataHashMap = getTransitionPathFirstConfluenceNodeData(sourceNode, prefixString);
        MDAGNode firstConfluenceNodeInPrefix = (MDAGNode) firstConfluenceNodeDataHashMap.get("confluenceNode");
        Integer toFirstConfluenceNodeTransitionCharIndex = (Integer) firstConfluenceNodeDataHashMap.get("toConfluenceNodeTransitionCharIndex");
        /////

        //Remove the register entries of all the nodes in the prefixString _transition path up to the first confluence node
        //(those past the confluence node will not need to be removed since they will be cloned and unaffected by the 
        //addition of suffixString). If there is no confluence node in prefixString, then remove the register entries in prefixString's entire _transition path
        removeTransitionPathRegisterEntries((toFirstConfluenceNodeTransitionCharIndex == null ? prefixString : prefixString.substring(0, toFirstConfluenceNodeTransitionCharIndex)));

        //If there is a confluence node in the prefix, we must duplicate the _transition path
        //of the prefix starting from that node, before we add suffixString (to the duplicate path).
        //This ensures that we do not disturb the other _transition paths containing this node.
        if (firstConfluenceNodeInPrefix != null)
        {
            String transitionStringOfPathToFirstConfluenceNode = prefixString.substring(0, toFirstConfluenceNodeTransitionCharIndex + 1);
            String transitionStringOfToBeDuplicatedPath = prefixString.substring(toFirstConfluenceNodeTransitionCharIndex + 1);
            cloneTransitionPath(firstConfluenceNodeInPrefix, transitionStringOfPathToFirstConfluenceNode, transitionStringOfToBeDuplicatedPath);
        }
        /////

        //Add the _transition based on suffixString to the end of the (possibly duplicated) _transition path corresponding to prefixString
        addTransitionPath(sourceNode.transition(prefixString), suffixString);
    }
658593
function replaceWithSurround(text, find, prefix, suffix) {
  const escapedString = escapeRegex(find);
  const re = new RegExp(escapedString, 'gi');
  return text.replace(re, matched => prefix + matched + suffix);
}
558721
def abbrev(self,dev_suffix=""):
        
        return '.'.join(str(el) for el in self.release) + \
            (dev_suffix if self.commit_count > 0 or self.dirty else "")