Find Jobs
Hire Freelancers

Insert spaces into long Multibyte/UTF-8 string

$10-15 USD

Anuluar
Postuar over 18 years ago

$10-15 USD

Paguhet në dorëzim
I need function written on PHP which insert spaces if string is too long. U must remember that string can be UTF-8/Multibyte encoded. This function need to keep formatting (do not calculate carriage return). There are similar functions but they don't work properly - change chars before space or insert tab instead of space etc. Here is this function taken from [login to view URL] which has such bugs. <?php function utf8_wordwrap($str,$len,$what){ $from=0; $str_length = preg_match_all('/[\x00-\x7F\xC0-\xFD]/', $str, $var_empty); $while_what = $str_length / $len; while($i <= round($while_what)){ $string = preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'. '((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s', '$1',$str); $total .= $string.$what; $from = $from+$len; $i++; } return $total; } ?> So if u want - u can cange this one or write new. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform PHP, Linux/Unix
ID e Projektit: 3915302

Rreth projektit

1 propozim
Projekt në distancë
Aktive 19 yrs ago

Po kërkoni të fitoni para?

Përfitimet e ofertës për Freelancer

Vendosni buxhetin dhe afatin tuaj
Paguhuni për punën tuaj
Përshkruani propozimin tuaj
Është falas të regjistrohesh dhe të bësh oferta për punë
1 Profesionisti ofron mesatarisht $13 USD për këtë punë
Avatari i Përdoruesit
See private message.
$12,75 USD në 2 ditë
0,0 (1 review)
0,0
0,0

Rreth klientit

Flamuri i UKRAINE
Kiev, Ukraine
5,0
6
Anëtar që nga maj 12, 2005

Verifikimi i klientit

Faleminderit! Ne ju kemi dërguar me email një lidhje për të kërkuar kredinë tuaj falas.
Ndodhi një gabim gjatë dërgimit të email-it tuaj. Ju lutemi provoni përsëri.
Përdorues të regjistruar Punë të postuara
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Po ngarkohet shikimi paraprak
Leja u dha për Geolocation.
Seanca e hyrjes ka skaduar dhe ke dalë. Hyr sërish.