---
title: "Converting Proxies to Strings"
url: https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings
language: matlab
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Converting Proxies to Strings

Programming language: MATLAB. Other languages: [C++](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings/csharp.md), [Java](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings/js.md), [PHP](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings/php.md), [Python](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings/ruby.md), [Swift](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings/swift.md).

This page describes how an application can *stringify* a proxy and create a property dictionary that captures all the proxy's properties.

## Stringifying a Proxy

You can stringify a proxy by calling `ice_toString` on this proxy. For example:

```matlab
greeter = GreeterPrx(communicator, 'greeter:tcp -h localhost -p 4061');
s = greeter.ice_toString();
```

`ice_toString` stringifies non-printable ASCII characters and non-ASCII characters in the proxy's identity, facet and adapter ID as specified through the [Ice.ToStringMode](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/matlab.md#ice.tostringmode) property.

## Proxy to Property

You can also perform a deeper proxy stringification by calling `proxyToProperty` on your communicator. For example:

```matlab
greeter = GreeterPrx(communicator, 'greeter:tcp -h localhost -p 4061');
propertyDict = communicator.proxyToProperty(greeter, 'Greeter');
```

The resulting map or dictionary holds all the [proxy properties](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/matlab.md) for the supplied proxy, except its [Context](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/matlab.md#name.context.key) properties. The second parameter of `proxyToProperty` is the base name for the [properties](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/properties-overview/matlab.md) in the returned map.

## See Also

- [Obtaining Proxies](https://docs.zeroc.com/ice/3.8/runtime/invocation/creating-proxies/matlab.md)
- [Proxy and Endpoint Syntax](https://docs.zeroc.com/ice/3.8/runtime/endpoint-syntax/matlab.md)
- [Proxy Properties](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/matlab.md)
