Adds the given string to the cache.

@param string $sharedString The string to be added to the cache
@param int $sharedStringIndex Index of the shared string in the sharedStrings.xml file
@return void
185694
public function addStringForIndex($sharedString, $sharedStringIndex)
    {
        $tempFilePath = $this->getSharedStringTempFilePath($sharedStringIndex);

        if (!$this->globalFunctionsHelper->file_exists($tempFilePath)) {
            if ($this->tempFilePointer) {
                $this->globalFunctionsHelper->fclose($this->tempFilePointer);
            }
            $this->tempFilePointer = $this->globalFunctionsHelper->fopen($tempFilePath, 'w');
        }

        // The shared string retrieval logic expects each cell data to be on one line only
        // Encoding the line feed character allows to preserve this assumption
        $lineFeedEncodedSharedString = $this->escapeLineFeed($sharedString);

        $this->globalFunctionsHelper->fwrite($this->tempFilePointer, $lineFeedEncodedSharedString . PHP_EOL);
    }
94791
protected function addIndent(string $string, int $indent = 0): string
    {
        return str_repeat(self::INDENT, max($indent, 0)) . $string;
    }
936504
public function parseXml($xmlString)
    {
        $feedXml = simplexml_load_string($xmlString);
        $attributes = $feedXml->attributes();
        $feedArray = (array) $feedXml;
        if (!empty($attributes)) {
            $this->attributes = (array) $attributes;
        }

        if (array_key_exists('author', $feedArray)) {
            $this->author = $this->processAuthorNode($feedArray);
        }

        if (array_key_exists('entry', $feedArray)) {
            $this->entry = $this->processEntryNode($feedArray);
        }

        if (array_key_exists('category', $feedArray)) {
            $this->category = $this->processCategoryNode($feedArray);
        }

        if (array_key_exists('contributor', $feedArray)) {
            $this->contributor = $this->processContributorNode($feedArray);
        }

        if (array_key_exists('generator', $feedArray)) {
            $generator = new Generator();
            $generatorValue = $feedArray['generator'];
            if (is_string($generatorValue)) {
                $generator->setText($generatorValue);
            } else {
                $generator->parseXml($generatorValue->asXML());
            }

            $this->generator = $generator;
        }

        if (array_key_exists('icon', $feedArray)) {
            $this->icon = (string) $feedArray['icon'];
        }

        if (array_key_exists('id', $feedArray)) {
            $this->id = (string) $feedArray['id'];
        }

        if (array_key_exists('link', $feedArray)) {
            $this->link = $this->processLinkNode($feedArray);
        }

        if (array_key_exists('logo', $feedArray)) {
            $this->logo = (string) $feedArray['logo'];
        }

        if (array_key_exists('rights', $feedArray)) {
            $this->rights = (string) $feedArray['rights'];
        }

        if (array_key_exists('subtitle', $feedArray)) {
            $this->subtitle = (string) $feedArray['subtitle'];
        }

        if (array_key_exists('title', $feedArray)) {
            $this->title = (string) $feedArray['title'];
        }

        if (array_key_exists('updated', $feedArray)) {
            $this->updated = \DateTime::createFromFormat(
                \DateTime::ATOM,
                (string) $feedArray['updated']
            );
        }
    }
1192484
public void setSharedFunction(String sharedFunctionFiles) {
		if (StrKit.isBlank(sharedFunctionFiles)) {
			throw new IllegalArgumentException("sharedFunctionFiles can not be blank");
		}
		
		String[] fileArray = sharedFunctionFiles.split(",");
		for (String fileName : fileArray) {
			JFinalViewResolver.sharedFunctionFiles.add(fileName);
		}
	}
1120696
public function parseXml($xmlString)
    {
        Validate::notNull($xmlString, 'xmlString');
        Validate::isString($xmlString, 'xmlString');
        $categoryXml = simplexml_load_string($xmlString);
        $attributes = $categoryXml->attributes();
        if (!empty($attributes['term'])) {
            $this->term = (string) $attributes['term'];
        }

        if (!empty($attributes['scheme'])) {
            $this->scheme = (string) $attributes['scheme'];
        }

        if (!empty($attributes['label'])) {
            $this->label = (string) $attributes['label'];
        }

        $this->undefinedContent = (string) $categoryXml;
    }
9100
function addString($string_to_add){
		settype($string_to_add,"string");
		if(strlen($string_to_add)>0){
			$this->_Buffer[] = new StringBufferItem($string_to_add);
		}
	}
403500
protected function flattenString($preString, array $strings, array &$flatten)
	{
		foreach ($strings as $key => $string)
		{
			if (strlen($preString) > 0)
			{
				$key = $preString.$this->delimiter.$key;
			}
			if ( ! is_array($string))
			{
				if (isset($flatten[$key]))
				{
					// we have a problem, 2 strings with the same key.
					throw new DuplicateKeyException("The key '$key' was found twice in the ".$this->locale." locale");
				}
				$flatten[$key] = $string;
				continue;
			}

			// recursive call
			$this->flattenString($key, $string, $flatten);
		}
	}
965774
public function parseXml($xmlString)
    {
        $this->_entry->parseXml($xmlString);
        $content = $this->_entry->getContent();
        if (is_null($content)) {
            $this->_ruleDescription = null;
        } else {
            $this->_ruleDescription = RuleDescription::create($content->getText());
        }
    }
459973
public void putString(String key, String value) {
		sharedPreferences.edit().putString(key, value).commit();
	}
1253461
public function mergeFromString($s) {
    // Adds in data from the string 's'.
    // Raises a ProtocolBufferDecodeError if, after successfully merging
    // in the contents of 's', this protocol message is still not initialized.
    $this->mergePartialFromString($s);
    $uninitialized = $this->checkInitialized();
    if ($uninitialized !== null) {
      throw new ProtocolBufferDecodeError(
        "Not initialized: " . $uninitialized);
    }
  }
393724
public void append(XMLString s) {
        append(s.ch, s.offset, s.length);
    }
457020
public function setSearchString($searchString): void
    {
        $this->searchString = $searchString;
        $this->query = $this->createSearchQuery();
    }
1212079
private function setShortIndexedRequiredString(string $shortIndexedRequiredString): self
    {
        $this->updatePropertyValue(
            ShortIndexedRequiredStringFieldInterface::PROP_SHORT_INDEXED_REQUIRED_STRING,
            $shortIndexedRequiredString
        );

        return $this;
    }
101695
public function writeString($string)
    {
        fwrite($this->sharedStringsFilePointer, '<si><t xml:space="preserve">' . $this->stringsEscaper->escape($string) . '</t></si>');
        $this->numSharedStrings++;

        // Shared string ID is zero-based
        return ($this->numSharedStrings - 1);
    }
1141017
public function attachShared(SharedEventManagerInterface $sharedEm)
    {
        $this->listeners[] = $sharedEm->attach($this->entityFormClass, 'init', array($this, 'onEntityFormInit'));
        $this->listeners[] = $sharedEm->attach($this->entityFormClass, 'setData', array($this, 'onEntityFormSetData'));
        $this->listeners[] = $sharedEm->attach($this->entityInputFilterClass, 'init', array($this, 'onEntityInputFilterInit'));
        $this->listeners[] = $sharedEm->attach($this->entityServiceClass, 'persist', array($this, 'onEntityServicePersist'));
    }
468007
@Override
	public void setPrefix(final String prefixString) {
		lock.writeLock().lock();
		try {
			if (prefixString == null || StringUtils.isBlank(prefixString)) {
				localPrefix.remove();
			} else {
				if (prefixes != null) {
					if (!prefixes.contains(prefixString)) {
						throw new IllegalArgumentException("The given prefix is not part of the prefixes.");
					}
				}
				localPrefix.set(prefixString);
			}
		} finally {
			lock.writeLock().unlock();
		}
	}
96791
public void addAll(String[] strings) {
		if (strings == null) {
			return;
		}
		for (String string : strings) {
			add(string);
		}
	}