The following warnings occurred:
Warning [2] Cannot modify header information - headers already sent by (output started at D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\scripts.php:2) - Line: 1701 - File: D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions.php PHP 5.2.17 (WINNT)
File Line Function
[PHP]   errorHandler->error
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions.php 1701 header
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions.php 1763 my_setcookie
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions_indicators.php 42 my_set_array_cookie
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\showthread.php 578 mark_thread_read
Warning [2] Cannot modify header information - headers already sent by (output started at D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\scripts.php:2) - Line: 1701 - File: D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions.php PHP 5.2.17 (WINNT)
File Line Function
[PHP]   errorHandler->error
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions.php 1701 header
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions.php 1763 my_setcookie
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions_indicators.php 218 my_set_array_cookie
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\inc\functions_indicators.php 48 mark_forum_read
D:\inetpub\vhosts\visionwebdirectory.com\httpdocs\forum\showthread.php 578 mark_thread_read





Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom trim function in javacript
06-30-2013, 06:28 PM
Post: #1
Custom trim function in javacript
function trim(str)

{

if(!str || typeof str != 'string')

return null;

return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');

}
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)