search for: strreplace

Displaying 20 results from an estimated 27 matches for "strreplace".

Did you mean: str_replace
2019 Sep 13
2
if statement with true value that contains a colon
How can I use an IF statement with a true value being a variable that has a colon in it? The colon in the true value variable is being taken as the delimiter for the false value. The only solution I came up with was some hackery to use STRREPLACE to replace the : with a % before the IF statement and then use STRREPLACE again after to change the % back to a :. i.e.: Set(dialexts=${STRREPLACE(dialexts,:,%)}); Set(dialexts=${IFTIME(8:00-22:00?${dialexts}&${MBDR}:${dialexts})}); Set(dialexts=${STRREPLACE(dialexts,%,:)}); Is...
2016 Jun 30
6
[PATCH 0/6] lib: string: add function strtolower()
This series introduces a new generic function strtolower(), which converts strings to lowercase in-place, overwriting the original string. This kind of functionality is needed in several places in the kernel. Right now, everybody seems to be implementing their own copy of this function. So, we replace several custom "strtolower" implementations with this new library function. Another
2016 Jul 01
2
[PATCH 1/6] lib: string: add function strtolower()
.../string.h b/include/linux/string.h > index 26b6f6a..aad605e 100644 > --- a/include/linux/string.h > +++ b/include/linux/string.h > @@ -116,6 +116,7 @@ extern void * memchr(const void *,int,__kernel_size_t); > #endif > void *memchr_inv(const void *s, int c, size_t n); > char *strreplace(char *s, char old, char new); > +char *strtolower(char *s); > > extern void kfree_const(const void *x); > > diff --git a/lib/string.c b/lib/string.c > index ed83562..6e3b560 100644 > --- a/lib/string.c > +++ b/lib/string.c > @@ -952,3 +952,17 @@ char *strreplace(char...
2016 Jul 09
2
[PATCH v3 1/7] lib: string: add functions to case-convert strings
.../string.h b/include/linux/string.h > index 26b6f6a..36c9d14 100644 > --- a/include/linux/string.h > +++ b/include/linux/string.h > @@ -116,6 +116,8 @@ extern void * memchr(const void *,int,__kernel_size_t); > #endif > void *memchr_inv(const void *s, int c, size_t n); > char *strreplace(char *s, char old, char new); > +extern void strlcpytoupper(char *dst, const char *src, size_t len); > +extern void strlcpytolower(char *dst, const char *src, size_t len); > > extern void kfree_const(const void *x); > > @@ -169,4 +171,42 @@ static inline const char *kbasename...
2019 Feb 20
3
branching in extensions.conf?
...ny less cumbersome way of doing conditionalized/branching in extensions.conf other than something like: exten => s,n,GotoIf($["${SIP}" = "PJSIP" ]?pjsip) exten => s,n,Dial(${ARG2},20,TtWw) exten => s,n,Goto(afterdial) exten => s,n(pjsip),Dial(${PJSIP_DIAL_CONTACTS(${STRREPLACE(ARG2,"PJSIP/","")})},20,TtWw) exten => s,n(afterdial),Goto(s-${DIALSTATUS},1) Granted the particular above example could probably be better written to simply modify $ARG2 based on ${SIP} rather than having two Dial() branches, but using the above as just an example for wanti...
2016 Jun 30
0
[PATCH 1/6] lib: string: add function strtolower()
...ions(+) diff --git a/include/linux/string.h b/include/linux/string.h index 26b6f6a..aad605e 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -116,6 +116,7 @@ extern void * memchr(const void *,int,__kernel_size_t); #endif void *memchr_inv(const void *s, int c, size_t n); char *strreplace(char *s, char old, char new); +char *strtolower(char *s); extern void kfree_const(const void *x); diff --git a/lib/string.c b/lib/string.c index ed83562..6e3b560 100644 --- a/lib/string.c +++ b/lib/string.c @@ -952,3 +952,17 @@ char *strreplace(char *s, char old, char new) return s; } EXPO...
2016 Jul 01
0
[PATCH 1/6] lib: string: add function strtolower()
...ring.h >> index 26b6f6a..aad605e 100644 >> --- a/include/linux/string.h >> +++ b/include/linux/string.h >> @@ -116,6 +116,7 @@ extern void * memchr(const void *,int,__kernel_size_t); >> #endif >> void *memchr_inv(const void *s, int c, size_t n); >> char *strreplace(char *s, char old, char new); >> +char *strtolower(char *s); >> >> extern void kfree_const(const void *x); >> >> diff --git a/lib/string.c b/lib/string.c >> index ed83562..6e3b560 100644 >> --- a/lib/string.c >> +++ b/lib/string.c >> @@ -952,3...
2016 Jul 01
0
[PATCH 1/6] lib: string: add function strtolower()
...b6f6a..aad605e 100644 >>> --- a/include/linux/string.h >>> +++ b/include/linux/string.h >>> @@ -116,6 +116,7 @@ extern void * memchr(const void *,int,__kernel_size_t); >>> #endif >>> void *memchr_inv(const void *s, int c, size_t n); >>> char *strreplace(char *s, char old, char new); >>> +char *strtolower(char *s); >>> >>> extern void kfree_const(const void *x); >>> >>> diff --git a/lib/string.c b/lib/string.c >>> index ed83562..6e3b560 100644 >>> --- a/lib/string.c >>> +++ b/...
2016 Jul 08
0
[PATCH v3 1/7] lib: string: add functions to case-convert strings
...ions(+) diff --git a/include/linux/string.h b/include/linux/string.h index 26b6f6a..36c9d14 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -116,6 +116,8 @@ extern void * memchr(const void *,int,__kernel_size_t); #endif void *memchr_inv(const void *s, int c, size_t n); char *strreplace(char *s, char old, char new); +extern void strlcpytoupper(char *dst, const char *src, size_t len); +extern void strlcpytolower(char *dst, const char *src, size_t len); extern void kfree_const(const void *x); @@ -169,4 +171,42 @@ static inline const char *kbasename(const char *path) return ta...
2016 Jul 01
1
[PATCH 1/6] lib: string: add function strtolower()
.../string.h b/include/linux/string.h > index 26b6f6a..aad605e 100644 > --- a/include/linux/string.h > +++ b/include/linux/string.h > @@ -116,6 +116,7 @@ extern void * memchr(const void *,int,__kernel_size_t); > #endif > void *memchr_inv(const void *s, int c, size_t n); > char *strreplace(char *s, char old, char new); > +char *strtolower(char *s); > > extern void kfree_const(const void *x); > > diff --git a/lib/string.c b/lib/string.c > index ed83562..6e3b560 100644 > --- a/lib/string.c > +++ b/lib/string.c > @@ -952,3 +952,17 @@ char *strreplace(char...
2016 Jul 09
0
[PATCH v3 1/7] lib: string: add functions to case-convert strings
...ring.h >> index 26b6f6a..36c9d14 100644 >> --- a/include/linux/string.h >> +++ b/include/linux/string.h >> @@ -116,6 +116,8 @@ extern void * memchr(const void *,int,__kernel_size_t); >> #endif >> void *memchr_inv(const void *s, int c, size_t n); >> char *strreplace(char *s, char old, char new); >> +extern void strlcpytoupper(char *dst, const char *src, size_t len); >> +extern void strlcpytolower(char *dst, const char *src, size_t len); >> >> extern void kfree_const(const void *x); >> >> @@ -169,4 +171,42 @@ static inline c...
2016 Jul 05
0
[PATCH v2 1/7] lib: string: add functions to case-convert strings
...ions(+) diff --git a/include/linux/string.h b/include/linux/string.h index 26b6f6a..c58d510 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -116,6 +116,8 @@ extern void * memchr(const void *,int,__kernel_size_t); #endif void *memchr_inv(const void *s, int c, size_t n); char *strreplace(char *s, char old, char new); +char *strncpytoupper(char *dst, const char *src, size_t len); +char *strncpytolower(char *dst, const char *src, size_t len); extern void kfree_const(const void *x); @@ -169,4 +171,50 @@ static inline const char *kbasename(const char *path) return tail ? tail +...
2016 Jul 08
6
[PATCH v3 0/7] lib: string: add functions to case-convert strings
This series introduces a family of generic string case conversion functions. This kind of functionality is needed in several places in the kernel. Right now, everybody seems to be implementing their own copy of this functionality. Based on the discussion of the previous version of this series[1] and the use cases found in the kernel, it does look like having several flavours of case conversion
2016 Jul 13
1
[PATCH v3 0/7] lib: string: add functions to case-convert strings
...take? diff --git a/include/linux/string.h b/include/linux/string.h index ae82d13..6cc85dc 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -116,8 +116,8 @@ extern void * memchr(const void *,int,__kernel_size_t); #endif void *memchr_inv(const void *s, int c, size_t n); char *strreplace(char *s, char old, char new); -extern void strlcpytoupper(char *dst, const char *src, size_t len); -extern void strlcpytolower(char *dst, const char *src, size_t len); +extern int strlcpytoupper(char *dst, const char *src, size_t len); +extern int strlcpytolower(char *dst, const char *src, size_t l...
2016 Jul 13
0
[PATCH v3 1/7] lib: string: add functions to case-convert strings
...t;>>> --- a/include/linux/string.h >>>> +++ b/include/linux/string.h >>>> @@ -116,6 +116,8 @@ extern void * memchr(const void *,int,__kernel_size_t); >>>> #endif >>>> void *memchr_inv(const void *s, int c, size_t n); >>>> char *strreplace(char *s, char old, char new); >>>> +extern void strlcpytoupper(char *dst, const char *src, size_t len); >>>> +extern void strlcpytolower(char *dst, const char *src, size_t len); >>>> >>>> extern void kfree_const(const void *x); >>>> >&...
2016 Jul 11
2
[PATCH v3 1/7] lib: string: add functions to case-convert strings
...b6f6a..36c9d14 100644 >>> --- a/include/linux/string.h >>> +++ b/include/linux/string.h >>> @@ -116,6 +116,8 @@ extern void * memchr(const void *,int,__kernel_size_t); >>> #endif >>> void *memchr_inv(const void *s, int c, size_t n); >>> char *strreplace(char *s, char old, char new); >>> +extern void strlcpytoupper(char *dst, const char *src, size_t len); >>> +extern void strlcpytolower(char *dst, const char *src, size_t len); >>> >>> extern void kfree_const(const void *x); >>> >>> @@ -169,4 +1...
2016 Aug 10
3
[PATCH v5 0/7] lib: string: add functions to case-convert strings
This series introduces a family of generic string case conversion functions. This kind of functionality is needed in several places in the kernel. Right now, everybody seems to be implementing their own copy of this functionality. Based on the discussion of the previous version of this series[1] and the use cases found in the kernel, it does look like having several flavours of case conversion
2016 Jul 22
3
[PATCH v4 0/7] lib: string: add functions to case-convert strings
This series introduces a family of generic string case conversion functions. This kind of functionality is needed in several places in the kernel. Right now, everybody seems to be implementing their own copy of this functionality. Based on the discussion of the previous version of this series[1] and the use cases found in the kernel, it does look like having several flavours of case conversion
2019 Feb 20
2
branching in extensions.conf?
...ime, but really looking for an answer to the "better way to branch" question. > My braces and parens may be off in this example sorry if it doesn't > work > out of the box. > exten => s,n,Dial(${IF($["${SIP}" = "PJSIP"]? > ${PJSIP_DIAL_CONTACTS(${STRREPLACE(ARG2,"PJSIP/","")})}{ARG2})},20,Tt > Ww) Hah. This won't work either, for the reason I asked about in my followup question about where the "true" value of an ${IF ...}has a colon in it and is taken to be the end of the true value and the start of the false val...
2016 Jul 10
1
[PATCH v3 0/7] lib: string: add functions to case-convert strings
On 7/8/2016 6:43 PM, Markus Mayer wrote: > This series introduces a family of generic string case conversion > functions. This kind of functionality is needed in several places in > the kernel. Right now, everybody seems to be implementing their own > copy of this functionality. > > Based on the discussion of the previous version of this series[1] and > the use cases found in