plugins/include/string.inc
changeset 830 97cd070a7ffa
parent 752 59887ed3c6e0
child 833 732bedfcbe3e
     1.1 --- a/plugins/include/string.inc	Tue May 22 03:39:18 2007 +0000
     1.2 +++ b/plugins/include/string.inc	Tue May 22 03:42:04 2007 +0000
     1.3 @@ -84,7 +84,6 @@
     1.4  /**
     1.5   * Returns whether two strings are equal.
     1.6   *
     1.7 - *
     1.8   * @param str1			First string (left).
     1.9   * @param str2			Second string (right).
    1.10   * @param caseSensitive	If true (default), comparison is case sensitive.
    1.11 @@ -206,7 +205,16 @@
    1.12   * @param argLen		Maximum length of argument buffer.
    1.13   * @return				Index to next piece of string, or -1 if none.
    1.14   */
    1.15 -native StrBreak(const String:source[], String:arg[], argLen);
    1.16 +native BreakString(const String:source[], String:arg[], argLen);
    1.17 +
    1.18 +/**
    1.19 + * Backwards compatibility stock - use BreakString
    1.20 + * @deprecated			Renamed to BreakString.
    1.21 + */
    1.22 +stock StrBreak(const String:source[], String:arg[], argLen)
    1.23 +{
    1.24 +	return BreakString(source, arg, argLen);
    1.25 +}
    1.26  
    1.27  /** 
    1.28   * Returns the number of bytes a character is using.  This is
    1.29 @@ -327,3 +335,11 @@
    1.30  	
    1.31  	return Format(buffer[len], maxlength-len, "%s", source);
    1.32  }
    1.33 +
    1.34 +/**
    1.35 + * Removes whitespace characters from the beginning and end of a string.
    1.36 + *
    1.37 + * @param str			The string to trim.
    1.38 + * @return				Number of bytes written (UTF-8 safe).
    1.39 + */
    1.40 +native TrimString(String:str[]);