Questions tagged [chop]

19 questions
0
votes
2 answers

Chop off text when it reaches certain word in Python

I'm using Python and I have an HTML-code which I want to chop off as soon as it reaches the word "toc", but I can't figure out how to do, anyone having some nice ideas?
0
votes
1 answer

Upload script, cropping/chopping thumbnails

I am trying to create an image uploading system but came across a problem. The system uploads the inserted image and creates a thumbnail. The user is allowed to give the thumbnail width and height. When the image is lets say 200px by 100px and the…
Tom Groot
  • 1,160
  • 1
  • 9
  • 26
0
votes
3 answers

kohana orm retrieve only specified amount of characters from text column

Currently I am writing a website using Kohana framework 3.3. Today, I wanted to create subpage where user would be able to browse news, however I encountered a small problem with Kohana ORM. I would like to retrieve only a dozen / several dozen…
sky
  • 3
  • 2
-1
votes
1 answer

How can I refine PHP sub-string and chop functions

I have the PHP code below, so my question is how can I refine it? $slug = $_SERVER['REQUEST_URI']; $myslug = substr($slug, 4); $new_slug = chop($myslug,"?lang=fr");
foolfell
  • 1
  • 1
1
2