Scalar functions
string
Commentary
added in 0.0.5
Generates strings which may be templated with #{}, containing the names of local identifiers 1, variables 2, or Java Datafaker expressions 3 (Datafaker version 2.4.1). Local identifiers will be resolved first, then vars, then Faker expressions.
Datafaker functions that take parameters must be invoked with single quotes and no spaces, as in #{Date.birthday '2','4'}. 4
By contrast to Datafaker's out-of-the-box expression language, ShadowTraffic preprocesses expression strings so that you can nest identifiers, which is especially useful if you want to do nested function calls. 5
You may occasionally want to change the shape of the strings Datafaker generates. The string function supports a handful of transforms. 6
By default, strings are generated with a locale configured for United States English, but you can override this. 7
Faker expressions and values
Use any of these expressions in the form of #{expr}. Where applicable, links are supplied to the literal value list within the Datafaker project.
- Address.buildingNumber †
- Address.city †
- Address.cityName †
- Address.cityPrefix †
- Address.citySuffix †
- Address.country †
- Address.countryCode †
- Address.fullAddress †
- Address.latLon †
- Address.latitude †
- Address.lonLat †
- Address.longitude †
- Address.mailBox †
- Address.postcode †
- Address.secondaryAddress †
- Address.state †
- Address.stateAbbr †
- Address.streetAddress †
- Address.streetAddressNumber †
- Address.streetName †
- Address.streetPrefix †
- Address.streetSuffix †
- Address.timeZone †
- Address.zipCode †
- Address.zipCodePlus4 †
- Ancient.god †
- Ancient.hero †
- Ancient.primordial †
- Ancient.titan †
- Animal.genus †
- Animal.name †
- Animal.scientificName †
- Animal.species †
- App.author †
- App.name †
- App.version †
- Appliance.brand †
- Appliance.equipment †
- AquaTeenHungerForce.character †
- Artist.name †
- Australia.animals †
- Australia.locations †
- Australia.states †
- Avatar.image
- Aviation.METAR †
- Aviation.aircraft †
- Aviation.airline †
- Aviation.airplane †
- Aviation.airport †
- Aviation.airportName †
- Aviation.armyHelicopter †
- Aviation.cargo †
- Aviation.civilHelicopter †
- Aviation.engineType †
- Aviation.flight †
- Aviation.flightStatus †
- Aviation.gate †
- Aviation.general †
- Aviation.manufacturer †
- Aviation.specialTypeDesignator †
- Aviation.warplane †
- Aws.accountId †
- Aws.acmARN †
- Aws.albARN †
- Aws.albTargetGroupARN †
- Aws.region †
- Aws.route53ZoneId †
- Aws.securityGroupId †
- Aws.service †
- Aws.subnetId †
- Aws.vpcId †
- Azure.appServiceEnvironment †
- Azure.appServicePlan †
- Azure.applicationGateway †
- Azure.bastionHost †
- Azure.containerApps †
- Azure.containerAppsEnvironment †
- Azure.containerInstance †
- Azure.containerRegistry †
- Azure.cosmosDBDatabase †
- Azure.firewall †
- Azure.keyVault †
- Azure.loadBalancer †
- Azure.loadTesting †
- Azure.logAnalytics †
- Azure.managementGroup †
- Azure.mysqlDatabase †
- Azure.networkSecurityGroup †
- Azure.postgreSQLDatabase †
- Azure.region †
- Azure.resourceGroup †
- Azure.serviceBus †
- Azure.serviceBusQueue †
- Azure.serviceBusTopic †
- Azure.springApps †
- Azure.sqlDatabase †
- Azure.staticWebApp †
- Azure.storageAccount †
- Azure.subscriptionId †
- Azure.tenantId †
- Azure.virtualMachine †
- Azure.virtualNetwork †
- Azure.virtualWan †
- Babylon5.character †
- Babylon5.quote †
- BackToTheFuture.character †
- BackToTheFuture.date †
- BackToTheFuture.quote †
- Barcode.ean13 †
- Barcode.ean8 †
- Barcode.gtin12 †
- Barcode.gtin13 †
- Barcode.gtin14 †
- Barcode.gtin8 †
- Barcode.type †
- Baseball.coaches †
- Baseball.players †
- Baseball.positions †
- Baseball.teams †
- Basketball.coaches †
- Basketball.players †
- Basketball.positions †
- Basketball.teams †
- Battlefield1.classes †
- Battlefield1.faction †
- Battlefield1.map †
- Battlefield1.vehicle †
- Battlefield1.weapon †
- Beer.brand †
- Beer.hop †
- Beer.malt †
- Beer.name †
- Beer.style †
- Beer.yeast †
- BigBangTheory.character †
- BigBangTheory.quote †
- BloodType.aboTypes †
- BloodType.bloodGroup †
- BloodType.pTypes †
- BloodType.rhTypes †
- Boardgame.artist †
- Boardgame.category †
- Boardgame.designer †
- Boardgame.mechanic †
- Boardgame.name †
- Boardgame.publisher †
- Boardgame.subdomain †
- BojackHorseman.characters †
- BojackHorseman.quotes †
- BojackHorseman.tongueTwisters †
- Book.author †
- Book.genre †
- Book.publisher †
- Book.title †
- Bool.bool
- BossaNova.artist