Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML String functions sstr and ssub - how to use?

Featured Replies

I am going to have to give up looking and ask you folks on this..I am outputting a frequency name to my GPS gauge:(@c:WaypointAirportFrequencyName, string) )%!s!How can I only take the first 4 characters - writing out APPROACH and DEPARTURE is too long. !4s! specifies minimum characters to print of course so that wont work. I kludged together a Formatted Text spec with a short X value to clip it but thats a crappy solution.I see in XML SDK they mention lc Converts a string to lowercase.uc Converts a string to uppercase.cap Capitalizes a string.chr Converts a number to a symbol.ord Converts a symbol to an integer.scat Concatenates strings.schr Finds a symbol in a string.scmp Compares strings.scmi Compares strings, ignoring case.sstr Finds a substring.ssub Extracts a substring.symb Extracts a single character.I cant find any examples of many of the lower functions whats the arguments to make them work?Does (@c:WaypointAirportFrequencyName, string) 4 1 ssub for example, would that extract first 4 characters starting with 1 I didnt find any examples in the GPS eitherAnyone have a key on using these?help!ThanksDwight

  • 2 months later...

Hi,I am looking for some answers on this subject as well.Did you succeed in your search for the use of these functions elsewhere?Roelof

AFAIK, FS9 XML won't allow strings in variables. If you've found some way around that, you're already ahead of me.Because of this limitation, I can't even begin to think of how to do ops on strings without using any variables... unless you wanted to code for every possibility but that certainly wouldn't work.Scott / Vorlin

>AFAIK, FS9 XML won't allow strings in variables. If you've>found some way around that, you're already ahead of me.>>Because of this limitation, I can't even begin to think of how>to do ops on strings without using any variables... unless you>wanted to code for every possibility but that certainly>wouldn't work.>>Scott / VorlinHello Scott,That seems to be correct but:(@c:NearestAirportCurrentIdent,string) 'EHAM' scmp ! if{ 3000 (>L:AP,number) } This compare function works! So even if you are not able to enter the string into an L:var you do have some ability to work with them.(@c:NearestAirportCurrentIdent,string) 'EH' sstr ! if{ 3000 (>L:AP,number) } also works. Note the "!". XML seems to have most of it upside down! (-:If you need to print it you could use something like: (L:AP,number) 3000 == EHAMI know it is primitive but it may give you a lead... Roelof

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.