# llGetRegionName

*LSL function*

```lsl
string string llGetRegionName();
```

- Returns: `string`
- Energy: 10

Returns a string containing the name of the current region.

Returns a [string](https://wiki.secondlife.com/wiki/string) that is the current [region](https://wiki.secondlife.com/wiki/Viewer_coordinate_frames#region) name

```lsl title="How to use" frame="terminal"
string result = llGetRegionName();
```

## Examples

<details open>
<summary>Example 1</summary>

```lsl collapse={9-20}
// Say what would be said by "Copy SLURL to clipboard" in the Map of the standard client

string wwGetSLUrl()
{
    string globe = "http://maps.secondlife.com/secondlife";
    string region = llGetRegionName();
    vector pos = llGetPos();
    string posx = (string)llRound(pos.x);
    string posy = (string)llRound(pos.y);
    string posz = (string)llRound(pos.z);
    return (globe + "/" + llEscapeURL(region) +"/" + posx + "/" + posy + "/" + posz);
}

default
{
    state_entry()
    {
        llOwnerSay( wwGetSLUrl() );
    }
}
```

</details>

## See also

### Functions

- [llRequestSimulatorData](/functions/llRequestSimulatorData/)
- [llGetSimulatorHostname](/functions/llGetSimulatorHostname/)
- [llGetParcelDetails](/functions/llGetParcelDetails/)
- [llEscapeURL](/functions/llEscapeURL/)

---

*Source: [LlGetRegionName](https://wiki.secondlife.com/wiki/LlGetRegionName) on the Second Life Wiki. Content from the Second Life Wiki article LlGetRegionName (revision 1216107, 2024-01-25), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llGetRegionName/
