Try this: var num = 1234 var first = num/100 var last = num%100 The playground's output is what you need. ...
Take a look over here: https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials-running-samples It has a sample of cutting a video which you can use in your application by downloading and including their Starter Edition pack. It's completely free but you'd have to register through and can be used in Android Studio, Eclipse and many other IDEs....
ios,uilabel,arabic,spaces,trimming
A bit of a hack, but one solution would be to use an attributed string in your label and include a transparent period (".") at the end of the string. Just replace your nudgeTicker: method. - (void)nudgeTicker:(id)target { NSString* firstLetter = [self.text substringWithRange: NSMakeRange(0,1)]; NSString* remainder = [self.text substringWithRange:NSMakeRange(1,[self.text length]-1)];...
ltrim does take multiple characters: $string = ltrim($string, '-0'); This will strip any zeroes and minus signs from the beginning of your string. EDIT: If you want to keep the minus sign, try something like this: $string = ($string[0] == '-') ? '-'.ltrim(substr($string, 1), '0') : ltrim($string, '0'); preg_replace is...
I put the contents in a file called foo.txt. foreach ($line in get-content foo.txt) { if ($line -ne '') { $line } } ...