Home > By category > Scripts >Development Tools > strncmpr



strncmpr

  • Downloads: 
  • Views: 
  • Rating:

Compare last N chars of strings or cell strings

Input and output equal Matlab's STRNCMP/STRNCMPI, but the strings are compared from right to left.

T = strncmpr(S1, S2, N) or T = strncmpir(S1, S2, N)
INPUT:
S1, S2: Strings or cell strings.
N: Number of characters to compare.
OUTPUT:
T: Logical array, TRUE if the last N characters are equal, FALSE otherwise.
For STRNCMPIR the case is ignored.

Comparing just two strings in the backward direction can be done in Matlab with a fair efficiency. But for cell strings, this C-Mex is much faster than equivalent Matlab methods: e.g. 3% processing time for comparing a string with a {1 x 100} cell, 1% for {1 x 1000}. I apply it to identify the extensions of file names stored in cell strings.
Call the unit-test function Teststrncmpr to check validity and speed.

Tested: Matlab 6.5, 7.7, 7.8, WinXP, compatibility to Linux and OS-X assumed.
Compiler: LCC2.4/3.8, BCC5.5, OpenWatcom 1.8, MSVC 2008.
It is assumed that wchar_t has the same size as mxChar.
Pre-compiled Mex: http://www.n-simon.de/mex

I'd appreciate suggestions for improvements and bug reports sent through email - thanks

Free download from Shareware Connection - Compare last N chars of strings or cell strings

Publisher: Jan Simon | License: Shareware
Version: 1.0 | Size: 10 KB | Platform: Matlab, Scripts
Released Date: 26-02-2013 | Rating: 0 | Title: strncmpr

Author Url: http://www.mathworks.com
Program Info Url: http://www.mathworks.com
Download Url: http://www.mathworks.com/matlabcentral/fx_files/27032/1/strncmpr.zip

More downloads from strncmpr publisher Jan Simon:

ScaleTime - ScaleTime - fast linear matrix interpolation

DateStr2Num - DATESTR2NUM - Fast conversion of DATESTR to DATENUM

Patch FILTFILT - If applied to a matrix, the function FILTFILT (Signal Processing Toolbox) calls itself recursively for each column.

fSGolayFilt - fSGolayFilt is a fast polynomial smoothing filter for uniformly spaced signals

ButterParam - ButterParam - Fast parameters for a digital Butterworth filter

strncmpr keywords:
strncmpr related downloads:

fRMField - fRMField: Remove field(s) from a struct - fast C-MEX

DateConvert - DateConvert converts the DATESTR(0) format to a date vector or serial date number and backwards

BlockMean - BLOCKMEAN - Fast mean of rectangular submatrices

FilterM - FilterM, FiltFiltM: Fast digital filter

dvdXsoft DVD to Zune Converter - Convert DVD to Zune Video! DVD to Zune Converter can convert video DVD to MP4 Video files suitable for Zune/iPod/PSP devices! It is the best for converting DVD to MP4 files in speed and compatibility. It can convert DVD to WMV. Support Windows Vista

Shareware Connection periodically updates pricing and software information of 'strncmpr' from company source 'Jan Simon' , so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft,  Using 'strncmpr' crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of strncmpr.

New Reviews

SlimCleaner - Nearly all PC users need to use various utilities to enhance performance of their laptop or desktop from time to time. Windows inbuilt utilities can serve the purpose but when you can find more capable third party apps at low or zero cost, why ...

FileStream TurboBackup - Nowadays, data security and backup have become commonplace activity for nearly all PC users. You need to backup precious data either in external media or cloud storage services to evade circumstances like hard disk failure or malware invasion. ...

McAfee AntiVirus Plus - In PC security sector, McAfee is a big name. Along with Symantec, this is one of the contenders catering to the PC users for a long time. However, with time, several new contenders have appeared on horizon and some of them are giving the old ...

IDrive Classic - For every type of computer user, backing up data has become near compulsory. Apart from data loss caused by hardware snags, you cannot rule out the risk of data loss caused by malware attacks. That explains why millions of PC users back up their ...

Magic Uneraser - Data loss can occur owing to a number of reasons, both within and beyond your control. Whether you have lost data owing to careless of another user or a hard drive failure has occurred, it is important to retrieve the data at any cost. There are ...

TunnelBear - While internet access has become cheaper and faster over the years, certain downsides of the World Wide Web still looms and affects users. Even if you have the resources and monetary capacity to afford a blazing fast and unlimited internet ...

PCMark 8 - Not every PC user would have penchant for running new benchmarks and benchmarking software in their computers. It is only hardcore gamers and seasoned users who like tinkering around with various settings in PC benchmarking tools. Such apps also ...

CyberGhost VPN - There are so many ways available to browse the web nowadays. You can use a plethora of devices and pick from various service providers to get online. However, tech savvy users resort to additional measures to access the internet without being ...

PureSync Personal - When you use computers, there is no way you can escape using specialized third party software. These need to be used for various needs including office productivity, web access, taking back-up and ensuring proper synchronization across multiple ...

Quick Heal PCTuner - Performance deficit or unexpected slowdown is something most PC users are acquainted with. Even those with powerful laptops and desktops have to face these issues from time to time. A PC can run slowly when temporary files clutter the HDD or ...




New Downloads

MacX iPhone DVD Ripper

MacX iPhone DVD Ripper
provides perfect solution to
rip DVDs to iPhone 6/6 Plus,
iPhone 5S/5C/5, iPhone
4S/4/3GS, iPod, ...

School Management System

The school management system
provides that platform to a
school with facilities its
management, making it more
effective.

Confessions Script

This confession php script
allows users to post their
confessions, read other
members confessions, share
their dating ...

Multiple Plot

multiplot - 2D-line plots on
several axes with common
x-axis multiplot(XDATA,YDATA,'
PropertyName',PropertyValue,..
.) ...

Cropping an Image with
resizable and draggable
rectangle

Crops the Image from a
resizable & draggable
rectangle

My First Attempt

The user has to modify the
function to be integrated in a
file named eval1.m enclosed in
the same directory & invoke
...

0-1 Knapsack

Please let others rate your
work

Nonlinearity Detection
using Zeroed Early-Time
FFTs

Nonlinearity detection scheme
based on zeroing the initial
time response over various
intervals and computing the
FFT of ...

ASPTemplate

ASPTemplate is an ASP/ASPX
HTML template engine.

Perfectly Matched
Layer(PML) in FDTD method.

In FDTD method we are
truncated the problem space

htmlArea Generator Script

htmlArea Generator dynamically
creates htmlAreas for you,
simply by pointing and
clicking through a simple UI.

Perfect Number Generator

It calculates perfect even #'s
with 2^(p-1)*(2^p - 1) where p
and (2^p - 1) %are prime. A
subsequent run yields a faster
...