It is used for getting koi code by specified index
@param string $strMessageIndex
@return string
191300
function GetCampCode($strMessageIndex) {
        if($this->posnetResponse->koiInfo == null)
            return "";

        if(array_key_exists($strMessageIndex, $this->posnetResponse->koiInfo))
            return $this->posnetResponse->koiInfo[$strMessageIndex]['code'];
        else
            return "";
    }
18349
public function indexOf($searchElement, $fromIndex = 0)
    {
        $result = array_search($searchElement, $this->getArrayCopy(), true);

        return $result === false ? -1 : $result + $fromIndex;

        // if ($fromIndex < 0) {
        //     $fromIndex = $this->length() + $fromIndex;
        // }
        // $result = array_search($searchElement, $this->slice($fromIndex)->getArrayCopy(), true);

        // return $result === false ? -1 : $result + $fromIndex;
    }
609512
public function formatError($index, $params)
    {
        $pattern = $this->hasMessage($index) ? $this->getMessage($index) : static::MESSAGE_DEFAULT_PATTERN;

        return vsprintf($pattern, $params);
    }
823119
public function getActionCodeDescription($orderIndex = 0)
    {
        $orderStatuses = $this->getOrderStatuses();
        return array_key_exists('actionCodeDescription', $orderStatuses[$orderIndex])
            ? $orderStatuses[$orderIndex]['actionCodeDescription'] : null;
    }
730524
@Override
  public String getMessage() {
    StringBuilder sb = new StringBuilder();
    sb.append("Illegal xsd:dateTime format: ");
    sb.append(super.getMessage());
    sb.append(" at index ");
    sb.append(index);
    sb.append(" of '");
    sb.append(input);
    sb.append("'");
    return sb.toString();
  }
649953
public MessageTransport getMessageTransport(String strMessageTransport)
    {
        if ((strMessageTransport == null) || (strMessageTransport.length() == 0))
            return null;
        if (Utility.isNumeric(strMessageTransport))
        {
            this.setKeyArea(MessageTransport.ID_KEY);
            this.getField(MessageTransport.ID).setString(strMessageTransport);  
        }
        else
        {
            this.setKeyArea(MessageTransport.CODE_KEY);
            this.getField(MessageTransport.CODE).setString(strMessageTransport);
        }
        try {
            if (this.seek(null))
                return this;
        } catch (DBException ex) {
            ex.printStackTrace();
        }
        return null;
    }
945394
static String getTrimmedToString(@NullableDecl MessageLite messageLite) {
    String subjectString = String.valueOf(messageLite);
    String trimmedSubjectString = subjectString.trim();
    if (trimmedSubjectString.startsWith("# ")) {
      String objectToString =
          String.format(
              "# %s@%s",
              messageLite.getClass().getName(), Integer.toHexString(messageLite.hashCode()));
      if (trimmedSubjectString.startsWith(objectToString)) {
        subjectString = trimmedSubjectString.replaceFirst(Pattern.quote(objectToString), "").trim();
      }
    }

    return subjectString.isEmpty() ? "[empty proto]" : subjectString;
  }
1082938
public function getOrderErrorCode($orderIndex = 0)
    {
        $orderStatuses = $this->getOrderStatuses();
        return array_key_exists('errorCode', $orderStatuses[$orderIndex])
            ? $orderStatuses[$orderIndex]['errorCode'] : null;
    }
645593
function getIndicesFromStringResponse($indices)
    {

        $lines = explode("\n", trim($indices));

        $data = [];

        foreach ($lines as $line) {

            $row = [];

            $line_array = explode(" ", trim($line));

            foreach ($line_array as $item) {
                if (trim($item) != "") {
                    $row[] = $item;
                }
            }

            if (in_array($row[2], array_keys(config("es.indices")))) {
                $row = array_prepend($row, "yes");
            } else {
                $row = array_prepend($row, "no");
            }

            $data[] = $row;
        }

        return $data;
    }
238141
public function request(?string $index = null, $xss_clean = false)
    {
        // Check if a field has been provided.
        if ($index === null && \count($_REQUEST) > 0) {
            $request = [];

            // Loop through the full $_REQUEST array and return the value.
            foreach (array_keys($_REQUEST) as $key) {
                $request[$key] = $this->fetchFromArray($_REQUEST, $key, $xss_clean);
            }

            return $request;
        }

        return $this->fetchFromArray($_REQUEST, $index, $xss_clean);
    }
984710
public Map<String,Object> getEMailParams(String strMessage)
    {
        Map<String,Object> properties = new Hashtable<String,Object>();
        int iIndex = this.getStartNextPropertyKey(-1, strMessage);
        while (iIndex != -1)
        {
            int iIndexEnd = strMessage.indexOf(END_OF_KEY_CHAR, iIndex);
            if (iIndexEnd == -1)
                break;
            String strKey = strMessage.substring(iIndex, iIndexEnd);
            if (strKey.indexOf(' ') != -1)
                strKey = strKey.substring(strKey.lastIndexOf(' ') + 1);
            iIndex = this.getStartNextPropertyKey(iIndexEnd + 1, strMessage);
            if (iIndex >= iIndexEnd)
            {
                for (iIndexEnd = iIndexEnd + 1; iIndexEnd < iIndex; iIndexEnd++)
                {
                    char chChar = strMessage.charAt(iIndexEnd);
                    if (!this.isLeadingWhitespace(chChar))
                        break;  // Start of value
                }
                if (iIndex == -1)
                    break;
                for (int i = iIndex - 1; i >= iIndexEnd; i--)
                {
                    char chChar = strMessage.charAt(i);
                    if (!this.isLeadingWhitespace(chChar))
                    {
                        String strValue = strMessage.substring(iIndexEnd, i + 1);
                        this.putProperty(properties, strKey, strValue);
                        break;
                    }
                }
            }
        }
        return properties;
    }
1069363
public function getTextContent($index = 0, $charset = MailMimeParser::DEFAULT_CHARSET)
    {
        $part = $this->getTextPart($index);
        if ($part !== null) {
            return $part->getContent($charset);
        }
        return null;
    }
255012
public function getHtmlResourceHandle($index = 0, $charset = MailMimeParser::DEFAULT_CHARSET)
    {
        $htmlPart = $this->getHtmlPart($index);
        if ($htmlPart !== null) {
            return $htmlPart->getContentResourceHandle($charset);
        }
        return null;
    }
17179
public String getString( int index ) {
      Object o = get( index );
      if( o != null ){
         return o.toString();
      }
      throw new JSONException( "JSONArray[" + index + "] not found." );
   }
372894
def get_text
      l = getvalue
      str = ""
      old = " "
      l.each_with_index do |line, i|
        tmp = line.gsub("\n","")
        tmp.gsub!("\r", "\n")
        if old[-1,1] !~ /\s/ and tmp[0,1] !~ /\s/
          str << " "
        end
        str << tmp
        old = tmp
      end
      str
    end
652398
public MimeMessage getMessage(Session session) {

		Assert.notNull(emails, "No email address given!");

		Map<String, String> recipients = emails.get(Message.RecipientType.TO);
		Assert.isTrue(recipients != null && recipients.size() > 0, "Missing to email address(es)!");

		boolean found = false;
		for (String email : recipients.keySet()) {
			if (!excluded(email)) { // at least one address is not excluded
				found = true;
				break;
			}
		}

		Assert.isTrue(found, "All to email address(es) are excluded!");

		if (StringUtils.isNullOrEmptyTrimmed(fromName)) {
			fromName = fromEmail;
		}

		Assert.notNullOrEmptyTrimmed(fromEmail, "Missing from email address!");
		Assert.notNullOrEmptyTrimmed(subject, "Missing email subject!");

		Assert.isTrue(!StringUtils.isNullOrEmptyTrimmed(content) || !StringUtils.isNullOrEmptyTrimmed(htmlContent), "Missing email content!");

		subject = subject.trim();
		content = content != null ? content.trim() : null;
		htmlContent = htmlContent != null ? htmlContent.trim() : null;

		log.info("Sending from: " + fromEmail + " (" + fromName + ")");

		MimeMessage msg = new MimeMessage(session);

		// FROM:
		try {
			msg.setFrom(new InternetAddress(fromEmail, fromName, UTF_8));

			// TO:
			addRecipients(Message.RecipientType.TO, msg);
			// CC:
			addRecipients(Message.RecipientType.CC, msg);
			// BCC:
			addRecipients(Message.RecipientType.BCC, msg);

			//msg.setSubject(subject, UTF_8);
			msg.setSubject(MimeUtility.encodeText(subject, UTF_8, "Q"));

			// add headers
			if (headers != null && headers.size() > 0) {
				for (String name : headers.keySet()) {
					msg.addHeader(name, headers.get(name));
				}
			}

			try {
				// simple message .. no attachment and only content or html content
				if ((attachments == null || attachments.size() == 0) &&
				    ((htmlContent == null && content != null) ||
				     (htmlContent != null && content == null))) {

					if (StringUtils.isNullOrEmptyTrimmed(content)) {
						msg.addHeader("Content-Type", "text/html");
						msg.setContent(htmlContent, "text/html; charset=" + UTF_8);
					} else {
						msg.setContent(content, "text/plain; charset=" + UTF_8);
					}
				}
				// Compose multipart message
				else {
					// must be in correct order from lower fidelity to higher
					Multipart multipart = new MimeMultipart();

					if (!StringUtils.isNullOrEmptyTrimmed(content)) {
						MimeBodyPart contentPart = new MimeBodyPart();
						contentPart.setContent(content, "text/plain; charset=" + UTF_8);
						multipart.addBodyPart(contentPart);
					}

					if (!StringUtils.isNullOrEmptyTrimmed(htmlContent)) {
						MimeBodyPart htmlPart = new MimeBodyPart();
						htmlPart.setContent(htmlContent, "text/html; charset=" + UTF_8);
						multipart.addBodyPart(htmlPart);
					}

					if (attachments != null && attachments.size() > 0) {
						for (MailAttachment attachment : attachments) {

							// add attachment
							MimeBodyPart part = new MimeBodyPart();
							if (attachment.fileName != null) {
								part.setFileName(attachment.fileName);
							}
							DataSource src = new ByteArrayDataSource(attachment.content, attachment.type);
							part.setDataHandler(new DataHandler(src));
							multipart.addBodyPart(part);
						}
					}

					msg.setContent(multipart);
				}

				// if save is not called mime part headers are not updated
				msg.saveChanges();
				// see: http://stackoverflow.com/questions/5028670/how-to-set-mimebodypart-contenttype-to-text-html
			}
			catch (Exception e) {
				log.error("Failed to add attachment to mail message: ", e);
				throw new IllegalArgumentException(e.getMessage(), e);
			}

		}
		catch (MessagingException | UnsupportedEncodingException e) {
			log.error("Mail massage build failed!", e);
			throw new IllegalArgumentException(e.getMessage(), e);
		}

		return msg;
	}
85553
public static function decode($str, &$index)
    {
        $result = 0;
        $shift = 0;

        do {
            $c = $str[$index++];
            $digit = Base64::decode($c);
            $continuation = ($digit & self::VLQ_CONTINUATION_BIT) != 0;
            $digit &= self::VLQ_BASE_MASK;
            $result = $result + ($digit << $shift);
            $shift = $shift + self::VLQ_BASE_SHIFT;
        } while ($continuation);

        return self::fromVLQSigned($result);
    }