Java Doc for StringModule.java in  » EJB-Server-resin-3.1.5 » quercus » com » caucho » quercus » lib » string » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server resin 3.1.5 » quercus » com.caucho.quercus.lib.string 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.quercus.module.AbstractQuercusModule
      com.caucho.quercus.lib.string.StringModule

StringModule
public class StringModule extends AbstractQuercusModule (Code)
PHP functions implemented from the string module

Inner Class :static class StrtrComparator implements Comparator<T>
Inner Class :abstract static class PrintfSegment
Inner Class :static class TextPrintfSegment extends PrintfSegment
Inner Class :static class LongPrintfSegment extends PrintfSegment
Inner Class :static class HexPrintfSegment extends PrintfSegment
Inner Class :static class DoublePrintfSegment extends PrintfSegment
Inner Class :static class StringPrintfSegment extends PrintfSegment
Inner Class :static class CharPrintfSegment extends StringPrintfSegment
Inner Class :static class SimpleStringReader

Field Summary
final public static  intCHAR_MAX
    
final public static  intCRYPT_BLOWFISH
    
final public static  intCRYPT_EXT_DES
    
final public static  intCRYPT_MD5
    
final public static  intCRYPT_SALT_LENGTH
    
final public static  intCRYPT_STD_DES
    
final public static  intLC_ALL
    
final public static  intLC_COLLATE
    
final public static  intLC_CTYPE
    
final public static  intLC_MESSAGES
    
final public static  intLC_MONETARY
    
final public static  intLC_NUMERIC
    
final public static  intLC_TIME
    
final public static  intSTR_PAD_BOTH
    
final public static  intSTR_PAD_LEFT
    
final public static  intSTR_PAD_RIGHT
    


Method Summary
public static  StringValueaddcslashes(StringValue source, String characters)
     Escapes a string using C syntax.
public static  StringValueaddslashes(StringValue source)
     Escapes a string for db characters.
public static  StringValuebin2hex(Env env, InputStream is)
     Converts a binary value to a hex value.
public static  StringValuechop(Env env, StringValue str, String charset)
     Alias of rtrim.
public static  Stringchr(long value)
    
public static  Stringchunk_split(String body, int chunkLen, String end)
    
public static  Stringconvert_cyr_string(Env env, String str, String from, String to)
     Converts from one cyrillic set to another.
public static  Valueconvert_uudecode(Env env, String source)
    
public static  Valueconvert_uuencode(StringValue source)
     uuencode a string.
public static  Valuecount_chars(StringValue data, int mode)
     Returns an array of information about the characters.
public static  longcrc32(InputStream is)
    
public static  Stringcrypt(String string, String salt)
    
public static  Valueexplode(StringValue separator, StringValue string, long limit)
    
public static  Valuefprintf(Env env, BinaryOutput os, StringValue format, Value[] args)
     Use printf style formatting to write a string to a file.
protected static  inthexToDigit(char ch)
    
public static  Valueimplode(Env env, Value glueV, Value piecesV)
    
protected static  booleanisWhitespace(char ch)
     Returns true if the character is a whitespace character.
public static  Valuejoin(Env env, Value glueV, Value piecesV)
    
public static  ArrayValuelocaleconv(Env env)
     Gets locale-specific symbols.
public static  StringValueltrim(Env env, StringValue string, String characters)
     Removes leading whitespace.
public static  StringValuemd5(Env env, InputStream is, boolean rawOutput)
    
public static  Valuemd5_file(Env env, Path source, boolean rawOutput)
    
public static  Stringmetaphone(String string)
     Returns the metaphone of a string.
public static  Stringmoney_format(Env env, String format, double value)
     Returns a formatted money value.
public static  Stringnumber_format(Env env, double value, int decimals, Value pointValue, Value groupValue)
     Returns a formatted number.
protected static  intoctToDigit(char ch)
    
public static  longord(StringValue string)
     Converts the first character to an integer.
public static  Valueparse_str(Env env, String str, Value ref)
     Parses the string as a query string.
public static  longprint(Env env, Value value)
     Prints the string.
public static  intprintf(Env env, StringValue format, Value[] args)
    
public static  Stringquoted_printable_decode(String str)
     Converts a RFC2045 quoted printable string to a string.
public static  Valuequotemeta(StringValue string)
     Escapes meta characters.
public static  StringValuertrim(Env env, StringValue string, String characters)
     Removes trailing whitespace.
public static  Valuesetlocale(Env env, int category, Value localeArg, Value[] fallback)
     Sets locale configuration.
public static  Stringsha1(String source, boolean rawOutput)
    
public static  Valuesha1_file(Env env, Path source, boolean rawOutput)
    
public static  Valuesoundex(StringValue string)
    
public static  Valuesprintf(StringValue format, Value[] args)
    
public static  Valuesscanf(Env env, StringValue string, StringValue format, Value[] args)
    
public static  Valuestr_ireplace(Env env, Value search, Value replace, Value subject, Value count)
     replaces substrings.
public static  StringValuestr_pad(StringValue string, int length, String pad, int type)
    
public static  Valuestr_repeat(StringValue string, int count)
    
public static  Valuestr_replace(Env env, Value search, Value replace, Value subject, Value count)
     replaces substrings.
public static  Valuestr_rot13(StringValue string)
    
public static  Stringstr_shuffle(String string)
    
public static  Valuestr_split(StringValue string, int chunk)
    
public static  Valuestr_word_count(StringValue string, int format, String additionalWordCharacters)
    
public static  intstrcasecmp(StringValue a, StringValue b)
    
public static  Valuestrchr(Env env, StringValue haystack, Value needle)
    
public static  intstrcmp(StringValue a, StringValue b)
    
public static  Valuestrcoll(String a, String b)
    
public static  Valuestrcspn(StringValue string, StringValue characters, int offset, int length)
    
public static  StringValuestrip_tags(StringValue string, String allowTags)
     Removes tags from a string.
public static  Stringstripcslashes(String source)
     Strip out the backslashes, recognizing the escape sequences, octal, and hexadecimal representations.
public static  Valuestripos(StringValue haystack, Value needleV, int offset)
     Returns the position of a substring, testing case insensitive.
public static  StringValuestripslashes(StringValue string)
     Strips out the backslashes.
public static  Valuestristr(StringValue haystack, Value needleV)
    
public static  Valuestrlen(Value value)
     Returns the length of a string.
public static  intstrnatcasecmp(StringValue a, StringValue b)
    
public static  intstrnatcmp(StringValue a, StringValue b)
    
public static  intstrncasecmp(StringValue a, StringValue b, int length)
    
public static  intstrncmp(StringValue a, StringValue b, int length)
    
public static  Valuestrpbrk(StringValue haystack, StringValue charList)
    
public static  Valuestrpos(StringValue haystack, Value needleV, int offset)
     Returns the position of a substring.
public static  Valuestrrchr(StringValue haystack, Value needleV)
    
public static  Valuestrrev(StringValue string)
     Reverses a string.
public static  Valuestrripos(String haystack, Value needleV, Value offsetV)
     Returns the position of a substring, testing case-insensitive.
public static  Valuestrrpos(StringValue haystack, Value needleV, Value offsetV)
     Returns the position of a substring.
public static  Valuestrspn(StringValue string, StringValue characters, int offset, int length)
    
public static  Valuestrstr(Env env, StringValue haystackV, Value needleV)
     Finds the first instance of a needle in haystack and returns the portion of haystack from the beginning of needle to the end of haystack.
public static  Valuestrtok(Env env, StringValue string1, Value string2)
     Split a string into tokens using any character in another string as a delimiter.
public static  StringValuestrtolower(StringValue string)
     Converts to lower case.
public static  StringValuestrtoupper(StringValue string)
     Converts to upper case.
public static  StringValuestrtr(Env env, StringValue string, Value fromV, StringValue to)
     Translates characters in a string to target values.
public static  Valuesubstr(Env env, StringValue string, int start, Value lenV)
    
public static  Valuesubstr_compare(Env env, StringValue mainStr, StringValue str, int offset, Value lenV, boolean isCaseInsensitive)
    
public static  Valuesubstr_count(Env env, StringValue haystackV, StringValue needleV, int offset, int length)
    
public static  Valuesubstr_replace(Value subjectV, StringValue replacement, Value startV, Value lengthV)
    
protected static  chartoHexChar(int d)
    
protected static  chartoUUChar(int d)
     Converts an integer digit to a uuencoded char.
protected static  chartoUpperCase(char ch)
    
protected static  chartoUpperHexChar(int d)
    
public static  Valuetrim(Env env, StringValue string, String characters)
     Removes leading and trailing whitespace.
public static  Stringucfirst(String string)
    
public static  Stringucwords(String string)
    
public static  intvprintf(Env env, StringValue format, ArrayValue array)
    
public static  Valuevsprintf(StringValue format, ArrayValue array)
    
public static  Stringwordwrap(String string, int width, String breakString, boolean cut)
     Wraps a string to the given number of characters.

Field Detail
CHAR_MAX
final public static int CHAR_MAX(Code)



CRYPT_BLOWFISH
final public static int CRYPT_BLOWFISH(Code)



CRYPT_EXT_DES
final public static int CRYPT_EXT_DES(Code)



CRYPT_MD5
final public static int CRYPT_MD5(Code)



CRYPT_SALT_LENGTH
final public static int CRYPT_SALT_LENGTH(Code)



CRYPT_STD_DES
final public static int CRYPT_STD_DES(Code)



LC_ALL
final public static int LC_ALL(Code)



LC_COLLATE
final public static int LC_COLLATE(Code)



LC_CTYPE
final public static int LC_CTYPE(Code)



LC_MESSAGES
final public static int LC_MESSAGES(Code)



LC_MONETARY
final public static int LC_MONETARY(Code)



LC_NUMERIC
final public static int LC_NUMERIC(Code)



LC_TIME
final public static int LC_TIME(Code)



STR_PAD_BOTH
final public static int STR_PAD_BOTH(Code)



STR_PAD_LEFT
final public static int STR_PAD_LEFT(Code)



STR_PAD_RIGHT
final public static int STR_PAD_RIGHT(Code)





Method Detail
addcslashes
public static StringValue addcslashes(StringValue source, String characters)(Code)
Escapes a string using C syntax.
See Also:   StringModule.stripcslashes
Parameters:
  source - the source string to convert
Parameters:
  characters - the set of characters to convert the escaped string



addslashes
public static StringValue addslashes(StringValue source)(Code)
Escapes a string for db characters.
Parameters:
  source - the source string to convert the escaped string



bin2hex
public static StringValue bin2hex(Env env, InputStream is)(Code)
Converts a binary value to a hex value.



chop
public static StringValue chop(Env env, StringValue str, String charset)(Code)
Alias of rtrim. Removes trailing whitespace.
Parameters:
  env - the quercus environment
Parameters:
  str - the string to be trimmed
Parameters:
  charset - optional set of characters to trim the trimmed string



chr
public static String chr(long value)(Code)
converts a number to its character equivalent
Parameters:
  value - the integer value the string equivalent



chunk_split
public static String chunk_split(String body, int chunkLen, String end)(Code)
Splits a string into chunks
Parameters:
  body - the body string
Parameters:
  chunkLen - the optional chunk length, defaults to 76
Parameters:
  end - the optional end value, defaults to "\r\n"



convert_cyr_string
public static String convert_cyr_string(Env env, String str, String from, String to)(Code)
Converts from one cyrillic set to another. This implementation does nothing, because quercus stores strings as 16 bit unicode.



convert_uudecode
public static Value convert_uudecode(Env env, String source)(Code)



convert_uuencode
public static Value convert_uuencode(StringValue source)(Code)
uuencode a string.



count_chars
public static Value count_chars(StringValue data, int mode)(Code)
Returns an array of information about the characters.



crc32
public static long crc32(InputStream is)(Code)
Calculates the crc32 value for a string
Parameters:
  str - the string value the crc32 hash



crypt
public static String crypt(String string, String salt)(Code)



explode
public static Value explode(StringValue separator, StringValue string, long limit)(Code)
Explodes a string into an array
Parameters:
  separator - the separator string
Parameters:
  string - the string to be exploded
Parameters:
  limit - the max number of elements an array of exploded values



fprintf
public static Value fprintf(Env env, BinaryOutput os, StringValue format, Value[] args)(Code)
Use printf style formatting to write a string to a file.
Parameters:
  fd - the file to write to
Parameters:
  format - the format string
Parameters:
  args - the valujes to apply to the format string



hexToDigit
protected static int hexToDigit(char ch)(Code)



implode
public static Value implode(Env env, Value glueV, Value piecesV)(Code)
implodes an array into a string
Parameters:
  glueV - the separator string
Parameters:
  piecesV - the array to be imploded a string of imploded values



isWhitespace
protected static boolean isWhitespace(char ch)(Code)
Returns true if the character is a whitespace character.



join
public static Value join(Env env, Value glueV, Value piecesV)(Code)
implodes an array into a string
Parameters:
  glueV - the separator string
Parameters:
  piecesV - the array to be imploded a string of imploded values



localeconv
public static ArrayValue localeconv(Env env)(Code)
Gets locale-specific symbols.



ltrim
public static StringValue ltrim(Env env, StringValue string, String characters)(Code)
Removes leading whitespace.
Parameters:
  string - the string to be trimmed
Parameters:
  characters - optional set of characters to trim the trimmed string



md5
public static StringValue md5(Env env, InputStream is, boolean rawOutput)(Code)
returns the md5 hash
Parameters:
  source - the string
Parameters:
  rawOutput - if true, return the raw binary a string of imploded values



md5_file
public static Value md5_file(Env env, Path source, boolean rawOutput)(Code)
returns the md5 hash
Parameters:
  source - the string
Parameters:
  rawOutput - if true, return the raw binary a string of imploded values



metaphone
public static String metaphone(String string)(Code)
Returns the metaphone of a string. This implentation produces identical results to the php version, which does contain some bugs.



money_format
public static String money_format(Env env, String format, double value)(Code)
Returns a formatted money value.
Parameters:
  format - the format
Parameters:
  value - the value a string of formatted values



number_format
public static String number_format(Env env, double value, int decimals, Value pointValue, Value groupValue)(Code)
Returns a formatted number.
Parameters:
  value - the value
Parameters:
  decimals - the number of decimals
Parameters:
  pointValue - the decimal point string
Parameters:
  groupValue - the thousands separator a string of the formatted number



octToDigit
protected static int octToDigit(char ch)(Code)



ord
public static long ord(StringValue string)(Code)
Converts the first character to an integer.
Parameters:
  string - the string to be converted the integer value



parse_str
public static Value parse_str(Env env, String str, Value ref)(Code)
Parses the string as a query string.
Parameters:
  env - the calling environment
Parameters:
  str - the query string
Parameters:
  array - the optional result array



print
public static long print(Env env, Value value)(Code)
Prints the string.
Parameters:
  env - the quercus environment
Parameters:
  value - the string to print



printf
public static int printf(Env env, StringValue format, Value[] args)(Code)
print to the output with a formatter
Parameters:
  env - the quercus environment
Parameters:
  format - the format string
Parameters:
  args - the format arguments the formatted string



quoted_printable_decode
public static String quoted_printable_decode(String str)(Code)
Converts a RFC2045 quoted printable string to a string.



quotemeta
public static Value quotemeta(StringValue string)(Code)
Escapes meta characters.
Parameters:
  string - the string to be quoted the quoted



rtrim
public static StringValue rtrim(Env env, StringValue string, String characters)(Code)
Removes trailing whitespace.
Parameters:
  env - the quercus environment
Parameters:
  string - the string to be trimmed
Parameters:
  characters - optional set of characters to trim the trimmed string



setlocale
public static Value setlocale(Env env, int category, Value localeArg, Value[] fallback)(Code)
Sets locale configuration.



sha1
public static String sha1(String source, boolean rawOutput)(Code)
returns the md5 hash
Parameters:
  source - the string
Parameters:
  rawOutput - if true, return the raw binary a string of imploded values



sha1_file
public static Value sha1_file(Env env, Path source, boolean rawOutput)(Code)
returns the md5 hash
Parameters:
  source - the string
Parameters:
  rawOutput - if true, return the raw binary a string of imploded values



soundex
public static Value soundex(StringValue string)(Code)



sprintf
public static Value sprintf(StringValue format, Value[] args)(Code)
Print to a string with a formatter
Parameters:
  format - the format string
Parameters:
  args - the format arguments the formatted string



sscanf
public static Value sscanf(Env env, StringValue string, StringValue format, Value[] args)(Code)
scans a string
Parameters:
  format - the format string
Parameters:
  args - the format arguments the formatted string



str_ireplace
public static Value str_ireplace(Env env, Value search, Value replace, Value subject, Value count)(Code)
replaces substrings.
Parameters:
  search - search string
Parameters:
  replace - replacement string
Parameters:
  subject - replacement
Parameters:
  count - return value



str_pad
public static StringValue str_pad(StringValue string, int length, String pad, int type)(Code)
Pads strings
Parameters:
  string - string
Parameters:
  length - length
Parameters:
  pad - padding string
Parameters:
  type - padding type



str_repeat
public static Value str_repeat(StringValue string, int count)(Code)
repeats a string
Parameters:
  string - string to repeat
Parameters:
  count - number of times to repeat



str_replace
public static Value str_replace(Env env, Value search, Value replace, Value subject, Value count)(Code)
replaces substrings.
Parameters:
  search - search string
Parameters:
  replace - replacement string
Parameters:
  subject - replacement
Parameters:
  count - return value



str_rot13
public static Value str_rot13(StringValue string)(Code)
rot13 conversion
Parameters:
  string - string to convert



str_shuffle
public static String str_shuffle(String string)(Code)
shuffles a string



str_split
public static Value str_split(StringValue string, int chunk)(Code)
split into an array
Parameters:
  string - string to split
Parameters:
  chunk - chunk size



str_word_count
public static Value str_word_count(StringValue string, int format, String additionalWordCharacters)(Code)



strcasecmp
public static int strcasecmp(StringValue a, StringValue b)(Code)
Case-insensitive comparison
Parameters:
  a - left value
Parameters:
  b - right value -1, 0, or 1



strchr
public static Value strchr(Env env, StringValue haystack, Value needle)(Code)
Finds the index of a substring
Parameters:
  env - the calling environment



strcmp
public static int strcmp(StringValue a, StringValue b)(Code)
Case-sensitive comparison
Parameters:
  a - left value
Parameters:
  b - right value -1, 0, or 1



strcoll
public static Value strcoll(String a, String b)(Code)
Locale-based comparison XXX: i18n
Parameters:
  a - left value
Parameters:
  b - right value -1, 0, or 1



strcspn
public static Value strcspn(StringValue string, StringValue characters, int offset, int length)(Code)
Finds the number of initial characters in string that do not match one of the characters in characters
Parameters:
  string - the string to search in
Parameters:
  characters - the character set
Parameters:
  offset - the starting offset
Parameters:
  length - the length the length of the match or FALSE if the offset or length are invalid



strip_tags
public static StringValue strip_tags(StringValue string, String allowTags)(Code)
Removes tags from a string.
Parameters:
  string - the string to remove
Parameters:
  allowTags - the allowable tags



stripcslashes
public static String stripcslashes(String source)(Code)
Strip out the backslashes, recognizing the escape sequences, octal, and hexadecimal representations.
Parameters:
  source - the string to clean
See Also:   StringModule.addcslashes



stripos
public static Value stripos(StringValue haystack, Value needleV, int offset)(Code)
Returns the position of a substring, testing case insensitive.
Parameters:
  haystack - the full argument to check
Parameters:
  needleV - the substring argument to check
Parameters:
  offsetV - optional starting position



stripslashes
public static StringValue stripslashes(StringValue string)(Code)
Strips out the backslashes.
Parameters:
  string - the string to clean



stristr
public static Value stristr(StringValue haystack, Value needleV)(Code)
Finds the first instance of a substring, testing case insensitively
Parameters:
  haystack - the string to search in
Parameters:
  needleV - the string to search for the trailing match or FALSE



strlen
public static Value strlen(Value value)(Code)
Returns the length of a string.
Parameters:
  value - the argument value



strnatcasecmp
public static int strnatcasecmp(StringValue a, StringValue b)(Code)
Case-insensitive comparison
Parameters:
  a - left value
Parameters:
  b - right value -1, 0, or 1



strnatcmp
public static int strnatcmp(StringValue a, StringValue b)(Code)
Case-sensitive comparison
Parameters:
  a - left value
Parameters:
  b - right value -1, 0, or 1



strncasecmp
public static int strncasecmp(StringValue a, StringValue b, int length)(Code)
Case-insensitive comparison
Parameters:
  a - left value
Parameters:
  b - right value -1, 0, or 1



strncmp
public static int strncmp(StringValue a, StringValue b, int length)(Code)
Case-sensitive comparison
Parameters:
  a - left value
Parameters:
  b - right value -1, 0, or 1



strpbrk
public static Value strpbrk(StringValue haystack, StringValue charList)(Code)
Returns a substring of haystack starting from the earliest occurence of any char in charList
Parameters:
  haystack - the string to search in
Parameters:
  charList - list of chars that would trigger match substring, else FALSE



strpos
public static Value strpos(StringValue haystack, Value needleV, int offset)(Code)
Returns the position of a substring.
Parameters:
  haystack - the string to search in
Parameters:
  needleV - the string to search for



strrchr
public static Value strrchr(StringValue haystack, Value needleV)(Code)
Finds the last instance of a substring
Parameters:
  haystack - the string to search in
Parameters:
  needleV - the string to search for the trailing match or FALSE



strrev
public static Value strrev(StringValue string)(Code)
Reverses a string.



strripos
public static Value strripos(String haystack, Value needleV, Value offsetV)(Code)
Returns the position of a substring, testing case-insensitive.
Parameters:
  haystack - the full string to test
Parameters:
  needleV - the substring string to test
Parameters:
  offsetV - the optional offset to start searching



strrpos
public static Value strrpos(StringValue haystack, Value needleV, Value offsetV)(Code)
Returns the position of a substring.
Parameters:
  haystack - the string to search in
Parameters:
  needleV - the string to search for



strspn
public static Value strspn(StringValue string, StringValue characters, int offset, int length)(Code)
Finds the number of initial characters in string that match one of the characters in characters
Parameters:
  string - the string to search in
Parameters:
  characters - the character set
Parameters:
  offset - the starting offset
Parameters:
  length - the length the length of the match or FALSE if the offset or length are invalid



strstr
public static Value strstr(Env env, StringValue haystackV, Value needleV)(Code)
Finds the first instance of a needle in haystack and returns the portion of haystack from the beginning of needle to the end of haystack.
Parameters:
  env - the calling environment
Parameters:
  haystack - the string to search in
Parameters:
  needleV - the string to search for, or the oridinal value of a character the trailing match or FALSE if needle is not found



strtok
public static Value strtok(Env env, StringValue string1, Value string2)(Code)
Split a string into tokens using any character in another string as a delimiter. The first call establishes the string to search and the characters to use as tokens, the first token is returned:
 strtok("hello, world", ", ")
 => "hello"
 
Subsequent calls pass only the token characters, the next token is returned:
 strtok("hello, world", ", ")
 => "hello"
 strtok(", ")
 => "world"
 
False is returned if there are no more tokens:
 strtok("hello, world", ", ")
 => "hello"
 strtok(", ")
 => "world"
 strtok(", ")
 => false
 
Calls that pass two arguments reset the search string:
 strtok("hello, world", ", ")
 => "hello"
 strtok("goodbye, world", ", ")
 => "goodbye"
 strtok("world")
 => false
 strtok(", ")
 => false
 



strtolower
public static StringValue strtolower(StringValue string)(Code)
Converts to lower case.
Parameters:
  string - the input string



strtoupper
public static StringValue strtoupper(StringValue string)(Code)
Converts to upper case.
Parameters:
  string - the input string



strtr
public static StringValue strtr(Env env, StringValue string, Value fromV, StringValue to)(Code)
Translates characters in a string to target values.
Parameters:
  string - the source string
Parameters:
  fromV - the from characters
Parameters:
  to - the to character map



substr
public static Value substr(Env env, StringValue string, int start, Value lenV)(Code)
Returns a substring
Parameters:
  env - the calling environment
Parameters:
  string - the string
Parameters:
  start - the start offset
Parameters:
  lenV - the optional length



substr_compare
public static Value substr_compare(Env env, StringValue mainStr, StringValue str, int offset, Value lenV, boolean isCaseInsensitive)(Code)



substr_count
public static Value substr_count(Env env, StringValue haystackV, StringValue needleV, int offset, int length)(Code)



substr_replace
public static Value substr_replace(Value subjectV, StringValue replacement, Value startV, Value lengthV)(Code)
Replaces a substring with a replacement
Parameters:
  subjectV - a string to modify, or an array of strings to modify
Parameters:
  replacement - the replacement string
Parameters:
  startV - the start offset
Parameters:
  lengthV - the optional length



toHexChar
protected static char toHexChar(int d)(Code)



toUUChar
protected static char toUUChar(int d)(Code)
Converts an integer digit to a uuencoded char.



toUpperCase
protected static char toUpperCase(char ch)(Code)
Returns the uppercase equivalent of the caharacter



toUpperHexChar
protected static char toUpperHexChar(int d)(Code)



trim
public static Value trim(Env env, StringValue string, String characters)(Code)
Removes leading and trailing whitespace.
Parameters:
  string - the string to be trimmed
Parameters:
  characters - optional set of characters to trim the trimmed string



ucfirst
public static String ucfirst(String string)(Code)
Uppercases the first character
Parameters:
  string - the input string



ucwords
public static String ucwords(String string)(Code)
Uppercases the first character of each word
Parameters:
  string - the input string



vprintf
public static int vprintf(Env env, StringValue format, ArrayValue array)(Code)
Formatted strings with array arguments
Parameters:
  format - the format string
Parameters:
  array - the arguments to apply to the format string



vsprintf
public static Value vsprintf(StringValue format, ArrayValue array)(Code)
Formatted strings with array arguments
Parameters:
  format - the format string
Parameters:
  array - the arguments to apply to the format string



wordwrap
public static String wordwrap(String string, int width, String breakString, boolean cut)(Code)
Wraps a string to the given number of characters.
Parameters:
  string - the input string
Parameters:
  width - the width
Parameters:
  breakString - the break string
Parameters:
  cut - if true, break on exact match



Fields inherited from com.caucho.quercus.module.AbstractQuercusModule
final protected static int PHP_INI_ALL(Code)(Java Doc)
final protected static int PHP_INI_PERDIR(Code)(Java Doc)
final protected static int PHP_INI_SYSTEM(Code)(Java Doc)
final protected static int PHP_INI_USER(Code)(Java Doc)

Methods inherited from com.caucho.quercus.module.AbstractQuercusModule
public Map<String, Value> getConstMap()(Code)(Java Doc)
public IniDefinitions getIniDefinitions()(Code)(Java Doc)
public String[] getLoadedExtensions()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.