Writes a string to the packet
171902
def write_string(self, value, length):
        """"""
        format = '!' + str(length) + 's'
        self.data.append(struct.pack(format, value))
        self.size += length
18750
def write(string)
      length = string.length
      while 0 < length
        IO::select(nil, [@sock])
        @dumplog.log_dump('>', string[-length..-1]) if @options.has_key?("Dump_log")
        length -= @sock.syswrite(string[-length..-1])
      end
    end
782593
public void write_string(final String s) {
        final int len = s.length();

        switch (len) {
        case 0:
            write_nil();
            break;
        default:
            if (len <= 65535 && is8bitString(s)) { // 8-bit string
                try {
                    final byte[] bytebuf = s.getBytes("ISO-8859-1");
                    write1(OtpExternal.stringTag);
                    write2BE(len);
                    writeN(bytebuf);
                } catch (final UnsupportedEncodingException e) {
                    write_nil(); // it should never ever get here...
                }
            } else { // unicode or longer, must code as list
                final int[] codePoints = OtpErlangString.stringToCodePoints(s);
                write_list_head(codePoints.length);
                for (final int codePoint : codePoints) {
                    write_int(codePoint);
                }
                write_nil();
            }
        }
    }
1099009
private static void writeString(String str, DataOutput writer) throws IOException {
		if (str == null) {
			writer.writeByte(0);
		} else {
			int blocks = str.length() >> 15;
			// Use smallest number of bytes possible for number of blocks.
			if (blocks > 0x3FFFFF) {
				// Need 4 bytes
				writer.writeByte(0xc0 | (blocks >> 24));
				writer.writeByte(0xFF & (blocks >> 16));
				writer.writeByte(0xFF & (blocks >> 8));
			} else if (blocks > 0x3FFF) {
				// Need 3 bytes
				writer.writeByte(0x80 | (blocks >> 16));
				writer.writeByte(0xFF & (blocks >> 8));
			} else if (blocks > 0x3F) {
				// Need 2 bytes
				writer.writeByte(0x40 | (blocks >> 8));
			}
			// Need to add 1 to number of blocks to avoid confusion with 'null'
			writer.writeByte(0xFF & (blocks+1));
			int end = 0;
			for (int i=0; i<blocks; i++) {
				int start = end;
				end = (i+1)<<15;
				writer.writeUTF(str.substring(start, end));
			}
			writer.writeUTF(str.substring(end));
		}
	}
250255
def writeString(self, str):
        
        ret = libxml2mod.xmlOutputBufferWriteString(self._o, str)
        return ret
552897
def write(self, request):
    """"""
    if FLAGS.sc2_verbose_protocol:
      self._log(" Writing request ".center(60, "-") + "\n")
      self._log_packet(request)
    self._write(request)
250066
def add_string(self, s):
        
        self.add_int(len(s))
        self.packet.write(s)
        return self
1204896
def send_packet(self):
        """"""
        waiter, packet = self.client.waiters.popleft()
        self.logger.debug('sending packet: %s', binascii.hexlify(packet))
        self.client.active_transaction = waiter
        self.client.in_transaction = True
        self.client.active_packet = packet
        self.reset_cmd_timeout()
        self.transport.write(packet)
1160707
public static int writeString(DataOutput out, String s) throws IOException {
        ByteBuffer bytes = encode(s);
        int length = bytes.limit();
        WritableUtils.writeVInt(out, length);
        out.write(bytes.array(), 0, length);
        return length;
    }
1006083
@Override
  public void writeStringData(String value, int offset, int length)
  {
    char []cBuf = _charBuffer;
    int cBufLength = cBuf.length;
    
    for (int i = 0; i < length; i += cBufLength) {
      int sublen = Math.min(length - i, cBufLength);
      
      value.getChars(offset + i, offset + i + sublen, cBuf, 0);
      
      writeStringChunk(cBuf, 0, sublen);
    }
  }
417944
@Override
    public void write(RtpPacket packet, RTPFormat format) {
        // checking format
        if (format == null) {
            if (logger.isTraceEnabled()) {
                logger.trace("No format specified. Packet dropped!");
            }
            return;
        }

        boolean locked = false;
        try {
            locked = this.lock.tryLock() || this.lock.tryLock(5, TimeUnit.MILLISECONDS);
            if (locked) {
                safeWrite(packet, format);
            }
        } catch (InterruptedException e) {
            if (logger.isTraceEnabled()) {
                logger.trace("Could not aquire write lock for jitter buffer. Dropped packet.");
            }
        } finally {
            if (locked) {
                this.lock.unlock();
            }
        }
    }
412103
def add_string(self, s):
        
        s = asbytes(s)
        self.add_size(len(s))
        self.packet.write(s)
        return self
130340
def write(str)
      s = str.to_s
      @length += Rack::Utils.bytesize(s)
      @writer.call s

      header["Content-Length"] = @length.to_s
      str
    end
277180
public void write(String str, int off, int len)  {
    	char[] chars = new char[len];
    	str.getChars(off, off+len, chars, 0);
    	buf.append(chars);
    }
529048
@Override
    public void write(String str) {
		int len = str.length();
		for (int i = 0; i < len; i++) {
			append(str.charAt(i));
		}
    }
1055143
def _write(self, s):
        """"""
        try:
            write = self.sock.write
        except AttributeError:
            # Works around a bug in python socket library
            raise IOError('Socket closed')
        else:
            while s:
                n = write(s)
                if not n:
                    raise IOError('Socket closed')
                s = s[n:]
949367
def Write(self, string):
    
    if sys.version_info[0] < 3:
      super(StdoutOutputWriter, self).Write(string)
    else:
      # sys.stdout.write() on Python 3 by default will error if string is
      # of type bytes.
      sys.stdout.write(string)