source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/BlueCCal/MultiCamSelfCal/MartinecPajdla/utils/str_cut.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 322 bytes |
Line | |
---|---|
1 | %str_cut Cut off last piece according to a delimeter from a string. |
2 | % |
3 | % [ head, tail ] = str_cut(s, delim) |
4 | |
5 | function [ head, tail ] = str_cut(s, delim) |
6 | |
7 | if nargin < 2, delim = '/'; end |
8 | |
9 | idcs = findstr(s,delim); |
10 | if isempty(idcs), |
11 | head = s; |
12 | tail = []; |
13 | else |
14 | head = s(1:idcs(end)); |
15 | tail = s(length(head)+1:end); |
16 | end |
Note: See TracBrowser
for help on using the repository browser.