Basic Pig Latin
✓ Published0🌍 Public
CCliffordAnderson
Last edited Mar 23, 2015
Created on Mar 23, 2015
This example demonstrates a simple Pig Latin converter for the word "air." It shows whether the word begins with a vowel and, if so, appends "ay" directly; otherwise, it moves the first consonant to the end before adding "ay." The XQuery code defines a word variable, checks the first letter against a list of vowels, and uses string functions like `fn:substring` and `fn:lower-case` to build the result. It relies on the XQuery 3.0 language and standard string concatenation with `||`. The source is a single gist authored by CliffordAnderson.
AI-generated description