String gets a string from data stored inside the flatbuffer.
967255
def String(self, off):
        """"""
        N.enforce_number(off, N.UOffsetTFlags)
        off += encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
        start = off + N.UOffsetTFlags.bytewidth
        length = encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
        return bytes(self.Bytes[start:start+length])
36836
function get(data) {
    if ('string' === typeof data) return { content: data };
    if (data.readme) return { content: data.readme, file: 'readme' };
    if (data.content) return data;
  }
374045
def get_string(string):
   
   truestring = string
   if string is not None:
      if '/' in string:
         if os.path.isfile(string):
            try:
               with open_(string,'r') as f:
                  truestring = ' '.join(line.strip() for line in f)
            except: pass
      if truestring.strip() == '': truestring = None
   return truestring
1080047
def gets(sep_string, length = nil)
      return read(length) if sep_string.nil?

      # Read more data until we get the sep_string
      while (index = @read_buffer.index(sep_string)).nil? && !@ios.eof?
        break if length && @read_buffer.length >= length

        read_block
      end
      index ||= -1
      data    = @read_buffer.slice!(0..index)
      @pos   += data.length
      return nil if data.empty? && eof?

      data
    end
416229
private static String getLongString(IoBufferEx buffer)
    {
        long len = getUnsignedInt(buffer);
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < len; i++)
        {
            builder.append((char)(buffer.getUnsigned()));
        }
        String s = builder.toString();
        return s;
    }
701134
def get_string(self, offset=0):
        """"""
        if not self.has_space(offset=offset):
            return ''

        # Get a char for each char in the current string from pos onward
        #  solong as the char is not whitespace.
        string = self.string
        pos = self.pos + offset
        for i, char in enumerate(string[pos:]):
            if char.isspace():
                return string[pos:pos + i]
        else:
            return string[pos:]
893550
public String getString(String string)
    {
        String strReturn = null;
        try   {
            if (m_resources == null)
                this.setLanguage(null);  // If the resource file is not here, add the default file.
            if (m_resources != null)
                if (string != null)
                    strReturn = m_resources.getString(string);
        } catch (MissingResourceException ex) {
            strReturn = null;
        }
        if ((strReturn != null) && (strReturn.length() > 0))
            return strReturn;
        else
            return string;
    }
903886
function stringToBuffer(data) {
    return (typeof Buffer.from === 'function' && Buffer.from !== Uint8Array.from) ?
        Buffer.from(data) : new Buffer(data);
}
438735
public static ByteBuffer stringToBytes(String s) {
    return Unpooled.wrappedBuffer(s.getBytes(StandardCharsets.UTF_8)).nioBuffer();
  }
834145
def read_string(self, string, source='<string>'):
        """"""
        sfile = io.StringIO(string)
        self.read_file(sfile, source)
787921
public static String readString(DataInput in) throws IOException {
        int length = WritableUtils.readVInt(in);
        byte[] bytes = new byte[length];
        in.readFully(bytes, 0, length);
        return decode(bytes);
    }
1181652
public static String readString(DataInput in) throws IOException {
        int length = in.readInt();
        if (length == -1)
            return null;
        byte[] buffer = new byte[length];
        in.readFully(buffer); // could/should use readFully(buffer,0,length)?
        return new String(buffer, "UTF-8");
    }
377524
private String getString(int offset, int maxLength) {
        int index = offset;
        int lastIndex = index + maxLength;
        while (index < lastIndex && (buffer[index] != 0)) {
            index++;
        }
        return new String(buffer, offset, index - offset, StandardCharsets.ISO_8859_1);
    }
299373
public static String readString(DataInputStream is, byte[] _buff) throws IOException {
		int l = is.readInt();
		byte[] buff = _buff;
		switch(l) {
			case -1: return null;
			case  0: return "";
			default:
				// Cover case where there is a large string, without always allocating a large buffer.
				if(l>buff.length) {
				    buff = new byte[l];
				}
				is.read(buff,0,l);
				return new String(buff,0,l);
		}
	}
157565
public static String readString(ByteBuffer buffer) throws IOException {
        final int NULL_STRING_INDICATOR = -1;

        final int len = buffer.getInt();

        // check for null string
        if (len == NULL_STRING_INDICATOR)
            return null;
        assert len >= 0;

        if (len > VoltType.MAX_VALUE_LENGTH) {
            throw new IOException("Serializable strings cannot be longer then "
                    + VoltType.MAX_VALUE_LENGTH + " bytes");
        }
        if (len < NULL_STRING_INDICATOR) {
            throw new IOException("String length is negative " + len);
        }

        // now assume not null
        final byte[] strbytes = new byte[len];
        buffer.get(strbytes);
        String retval = null;
        try {
            retval = new String(strbytes, "UTF-8");
        } catch (final UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return retval;
    }
294228
public String getString(String string)
    {
        if (this.getRecord() != null)
            if (this.getRecord().getTask() != null)
                string = this.getRecord().getTask().getString(string);
        return string;
    }
300079
def _try_get_string(dev, index, langid = None, default_str_i0 = "",
        default_access_error = "Error Accessing String"):
    
    if index == 0 :
        string = default_str_i0
    else:
        try:
            if langid is None:
                string = util.get_string(dev, index)
            else:
                string = util.get_string(dev, index, langid)
        except :
            string = default_access_error
    return string