Build the final list of coalesced strings

@param  array[] $prefixStrings
@param  array   $suffix
@return array[]
504102
protected function buildCoalescedStrings(array $prefixStrings, array $suffix)
	{
		$strings = $this->runPass($this->buildPrefix($prefixStrings));
		if (count($strings) === 1 && $strings[0][0][0] === [])
		{
			// If the prefix has been remerged into a list of strings which contains only one string
			// of which the first element is an optional alternations, we only need to append the
			// suffix
			$strings[0][] = $suffix;
		}
		else
		{
			// Put the current list of strings that form the prefix into a new list of strings, of
			// which the only string is composed of our optional prefix followed by the suffix
			array_unshift($strings, []);
			$strings = [[$strings, $suffix]];
		}

		return $strings;
	}
341666
protected synchronized void addPrefix(final String prefixString) {
		if (prefixString != null) {
			final Set<String> prefixes = getPrefixes();
			prefixes.add(prefixString);
			setPrefixes(prefixes);
		}
	}
357160
public function getPathByConvention($suffix = null)
    {
        if (empty($suffix)) {
            return sprintf('%s_nodes', $this->getBundleName());
        }

        return sprintf('%s_nodes_%s', $this->getBundleName(), $suffix);
    }
532515
private function stringEndsWith(string $string, string $suffix): bool
    {
        return substr($string, -strlen($suffix)) === $suffix;
    }
122166
public function getRenderTemplates($suffix = '')
    {
        $classes = ClassInfo::ancestry($this->ClassName);
        $classes[static::class] = static::class;
        $classes = array_reverse($classes);
        $templates = [];

        foreach ($classes as $key => $class) {
            if ($class == BaseElement::class) {
                continue;
            }

            if ($class == DataObject::class) {
                break;
            }

            if ($style = $this->Style) {
                $templates[$class][] = $class . $suffix . '_'. $this->getAreaRelationName() . '_' . $style;
                $templates[$class][] = $class . $suffix . '_' . $style;
            }
            $templates[$class][] = $class . $suffix . '_'. $this->getAreaRelationName();
            $templates[$class][] = $class . $suffix;
        }

        $this->extend('updateRenderTemplates', $templates, $suffix);

        $templateFlat = [];
        foreach ($templates as $class => $variations) {
            $templateFlat = array_merge($templateFlat, $variations);
        }

        return $templateFlat;
    }
699268
public void setPrefixLists(java.util.Collection<PrefixList> prefixLists) {
        if (prefixLists == null) {
            this.prefixLists = null;
            return;
        }

        this.prefixLists = new com.amazonaws.internal.SdkInternalList<PrefixList>(prefixLists);
    }
575432
public static File[] getDescriptorFiles( File definitionDir , final String prefix , final String suffix )
    {
        return definitionDir.listFiles(new FileFilter() {
            /*
             * (non-Javadoc)
             * @see java.io.FileFilter#accept(java.io.File)
             */
            @Override
			public boolean accept(File pathname)
            {
                if (!pathname.isFile() || !pathname.canRead())
                    return false;
                
                String name = pathname.getName();
                return name.toLowerCase().endsWith(suffix) && name.startsWith(prefix);
            }
        });
    }
841569
public function getFlexiData($suffix = null, $conditions = null)
    {
        $finalUrl          = '';
        $evidenceToRestore = null;
        $urlParams         = $this->defaultUrlParams;

        if (!empty($conditions)) {
            if (is_array($conditions)) {
                $this->extractUrlParams($conditions, $urlParams);
                if (array_key_exists('evidence', $conditions) && is_null($this->getColumnInfo('evidence'))) {
                    $evidenceToRestore = $this->getEvidence();
                    $this->setEvidence($conditions['evidence']);
                    unset($conditions['evidence']);
                }
                $conditions = $this->flexiUrl($conditions);
            }

            if (strlen($conditions) && ($conditions[0] != '/')) {
                $conditions = '('.self::urlEncode($conditions).')';
            }
        }

        if (strlen($suffix) && ($suffix != '$sum')) {
            if (preg_match('/^http/', $suffix) || ($suffix[0] == '/') || is_numeric($suffix)) {
                $finalUrl = $suffix;
            } else {
                if (preg_match('/^(code|ext):(.*)/', $suffix)) {
                    $finalUrl = self::urlizeId($suffix);
                } else {
                    $finalUrl = $suffix;
                }
            }
        }

        $finalUrl .= $conditions;

        if ($suffix == '$sum') {
            $finalUrl .= '/$sum';
        }

        if (!empty($urlParams)) {
            if (strstr($finalUrl, '?')) {
                $finalUrl .= '&';
            } else {
                $finalUrl .= '?';
            }

            $finalUrl .= http_build_query(array_map(function($a) {
                return is_bool($a) ? ($a ? 'true' : 'false' ) : $a;
            }, $urlParams),
                null, '&', PHP_QUERY_RFC3986);
        }

        $transactions     = $this->performRequest($finalUrl, 'GET');
        $responseEvidence = $this->getResponseEvidence();
        if (is_array($transactions) && array_key_exists($responseEvidence,
                $transactions)) {
            $result = $transactions[$responseEvidence];
            if ((count($result) == 1) && (count(current($result)) == 0 )) {
                $result = null; // Response is empty Array
            }
        } else {
            $result = $transactions;
        }
        if (!is_null($evidenceToRestore)) {
            $this->setEvidence($evidenceToRestore);
        }
        return $result;
    }
551372
def keys_with_suffix(self, suffix):
        
        return [k.rstrip(suffix) for k in self.keys() if k.endswith(suffix)]
794871
public static Predicate<String> endsWith(final String suffix) {
		return new Predicate<String>() {
			@Override
			public boolean apply(final String input) {
				return input.endsWith(suffix);
			}
		};
	}
1101318
protected function buildSuffix(array $strings)
	{
		$suffix = [[]];
		foreach ($strings as $string)
		{
			if ($this->isCharacterClassString($string))
			{
				foreach ($string[0] as $element)
				{
					$suffix[] = $element;
				}
			}
			else
			{
				$suffix[] = $string;
			}
		}

		return $suffix;
	}
946870
public static String[] splitSuffix(String suffix) {
    String theSuffix = suffix;

    String[] parts;
    if (StringUtils.isBlank(theSuffix)) {
      // no suffix given - return empty list
      parts = new String[0];
    }
    else {
      // remove leading slash
      if (theSuffix.startsWith(ESCAPED_SLASH)) {
        theSuffix = theSuffix.substring(ESCAPED_SLASH.length());
      }

      // remove file extension
      theSuffix = StringUtils.substringBeforeLast(theSuffix, ".");

      // split the suffix to extract the paths of the selected components
      parts = StringUtils.split(theSuffix, SUFFIX_PART_DELIMITER);
    }

    return parts;
  }
96200
public List<String> getExtensionPoints(String prefix,String suffix){
		return extensionPointsCache.get(prefix+"@"+suffix);
	}
1101338
public static function endsWith($string, $suffix) {
    return (mb_strrpos($string,$suffix) === mb_strlen($string) - mb_strlen($suffix));
  }
1088995
public function getPrefix($suffix = null)
    {
        $prefix = $this->console->option('prefix');

        return $prefix ? $prefix.$suffix : null;
    }
354618
private function getRelationList($mapping, $suffix)
    {
        if (!isset($mapping['embed'.$suffix]) && !isset($mapping['reference'.$suffix])) {
            return [];
        }

        $relations = [];
        if (isset($mapping['embed'.$suffix])) {
            $relations = array_merge($relations, $mapping['embed'.$suffix]);
        }
        if (isset($mapping['reference'.$suffix])) {
            $relations = array_merge($relations, $mapping['reference'.$suffix]);
        }

        return array_map(
            function ($key, $value) {
                return [
                    'name' => $key,
                    'type' => $value['targetDocument']
                ];
            },
            array_keys($relations),
            $relations
        );
    }
93881
@Override
  public String[] getFileSuffixes() {
    String[] suffixes = filterEmptyStrings(settings.getStringArray(GroovyPlugin.FILE_SUFFIXES_KEY));
    if (suffixes.length == 0) {
      suffixes = StringUtils.split(GroovyPlugin.DEFAULT_FILE_SUFFIXES, ",");
    }
    return addDot(suffixes);
  }