1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: string conversion to uppercase or lowercase |
From: | "Lang, Keenan C. via Tech-talk" <[email protected]> |
To: | "[email protected]" <[email protected]>, Jeong Han Lee <[email protected]> |
Date: | Mon, 18 Nov 2019 17:21:22 +0000 |
The scalcout record from the calc module (https://github.com/epics-modules/calc) could theoretically do this by using string replacements.
record("scalcout", "$(P)$(R)to_upper_1")
{
field("CALC", "AA{'a','A'}{'b','B'}...")
}
Though, with a maximum length of 80 characters, you'd only be able to get 8 replacements per record. You'd have to chain together a set of 4 of these records to make an entire string capitalized (and then another 4 records for lowercase).
Another possible option is the luascript record from the lua module (https://github.com/epics-modules/lua).
record("luascript", "$(P)$(R)to_upper")
{
field("CODE", "return string.upper(AA)")
}
From: Tech-talk <[email protected]> on behalf of Jeong Han Lee via Tech-talk <[email protected]>
Sent: Sunday, November 17, 2019 5:33 PM To: [email protected] <[email protected]> Subject: string conversion to uppercase or lowercase Hi,
Is there a way to convert a string from uppercase to lowercase or vice-verse by using only available records within database files? Best, Han |